From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124021 invoked by alias); 10 Mar 2015 15:42:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 123970 invoked by uid 48); 10 Mar 2015 15:42:05 -0000 From: "dmalcolm at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01134.txt.bz2 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))