public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65378] New: Tweak to wording of -Wodr message
Date: Tue, 10 Mar 2015 15:42:00 -0000	[thread overview]
Message-ID: <bug-65378-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65378

            Bug ID: 65378
           Summary: Tweak to wording of -Wodr message
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org

I think the wording to the -Wodr message is overly terse, and potentially
confusing.

See e.g. bug 64275 where this message is reported:

warning: type 'struct failure' violates one definition rule [-Wodr]
     class _GLIBCXX_ABI_TAG_CXX11 failure : public system_error

A reasonable (but incorrect) way for a user to read the above message is to
think that there are some "definition rules", and that of these "definition
rules", "struct failure" violates one of them, and then to wonder which such
definition rule is being violated.

I think this message at least needs a "the":
  "type %qT violates the one definition rule"
making the message be:
 warning: type 'struct failure' violates the one definition rule [-Wodr]

In many articles I've seen discussing the ODR, I've seen the words "One
Definition Rule" be capitalized, and given that the warning flag is an acronym,
capitalizing the words is reasonable.  Hence the wording could be:
  "type %qT violates the One Definition Rule"
i.e. adding the "the", and capitalizing the letters in the term.

With that, the message would read:
 warning: type 'struct failure' violates the One Definition Rule [-Wodr]

Message in question is here in ipa-devirt.c:
  if (!warning_at (DECL_SOURCE_LOCATION (TYPE_NAME (t1)), OPT_Wodr,
           "type %qT violates one definition rule",
           t1))


             reply	other threads:[~2015-03-10 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 15:42 dmalcolm at gcc dot gnu.org [this message]
2015-03-10 15:45 ` [Bug lto/65378] " dmalcolm at gcc dot gnu.org
2015-04-27  7:52 ` hubicka at gcc dot gnu.org
2015-06-08 20:38 ` hubicka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65378-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).