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

* [Bug lto/65378] Tweak to wording of -Wodr message
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-03-10 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #0)
[...]
> 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))
and in 5 other places in that file.
>From gcc-bugs-return-479992-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 10 15:58:27 2015
Return-Path: <gcc-bugs-return-479992-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 98329 invoked by alias); 10 Mar 2015 15:58:27 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 89840 invoked by uid 55); 10 Mar 2015 15:58:19 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/65367] [5 Regression] indefinite loop occurs with sanitize enabled and certain optimization options
Date: Tue, 10 Mar 2015 15:58:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65367-4-7JAKLFMYfr@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65367-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65367-4@http.gcc.gnu.org/bugzilla/>
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/msg01136.txt.bz2
Content-length: 642

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide367

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Tue Mar 10 15:57:45 2015
New Revision: 221325

URL: https://gcc.gnu.org/viewcvs?rev"1325&root=gcc&view=rev
Log:
    PR sanitizer/65367
    * ubsan.c (ubsan_expand_objsize_ifn): Update GSI instead of GSI_ORIG
    when only removing the statement.  Handle expanding UBSAN_OBJECT_SIZE
    separately.

    * c-c++-common/ubsan/pr65367.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/ubsan/pr65367.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/ubsan.c


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

* [Bug lto/65378] Tweak to wording of -Wodr message
  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
  2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-04-27  7:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-27
                 CC|                            |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
David,
sorry, I did not notice this PR before.  Indeed

warning: type 'struct failure' violates the One Definition Rule [-Wodr]

seems better than current wording.  Would you go ahead and update that in
ipa-devirt? (the patch is preapproved).  I would welcome other refinements in
the warnings too.


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

* [Bug lto/65378] Tweak to wording of -Wodr message
  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
  2 siblings, 0 replies; 4+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-06-08 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Mon Jun  8 20:37:53 2015
New Revision: 224248

URL: https://gcc.gnu.org/viewcvs?rev=224248&root=gcc&view=rev
Log:

        PR lto/65378
        * ipa-utils.h (warn_types_mismatch): Update prototype.
        * ipa-devirt.c (odr_types_equivalent_p): Add loc1/loc2
        parameters.
        (type_mismatch_p): New function.
        (warn_types_mismatch): Reorg to work better on non-C++ types.
        (odr_types_equivalent_p): Add loc1/loc2 parameters.
        (add_type_duplicate): Update.
        * lto-symtab.c (warn_type_compatibility_p): Fix call of
        odr_or_derived_type_p.
        (lto_symtab_merge_decls_2): Update call of warn_types_mismatch.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-devirt.c
    trunk/gcc/ipa-utils.h
    trunk/gcc/lto/ChangeLog
    trunk/gcc/lto/lto-symtab.c


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