public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/65378] New: Tweak to wording of -Wodr message
@ 2015-03-10 15:42 dmalcolm at gcc dot gnu.org
  2015-03-10 15:45 ` [Bug lto/65378] " dmalcolm at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-03-10 15:42 UTC (permalink / raw)
  To: gcc-bugs

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))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-08 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 15:42 [Bug lto/65378] New: Tweak to wording of -Wodr message dmalcolm at gcc dot gnu.org
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

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).