public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Andrew Burgess <andrew.burgess@embecosm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [gdb/build] Fix Werror=nonnull-compare build breaker with gcc 12
Date: Wed, 28 Jul 2021 10:15:50 -0600	[thread overview]
Message-ID: <87eebie7nt.fsf@tromey.com> (raw)
In-Reply-To: <f898e9fb-d9a5-e294-483c-15542015248c@suse.de> (Tom de Vries's message of "Tue, 27 Jul 2021 18:28:30 +0200")

Tom> I managed now to reproduce, and wrote a patch along these lines.

Tom> Any comments?

Tom> In particular, any suggestion where to put ignore_nonnull?

Tom> Or, is it perhaps a better idea to have a gdb_assert_nonnull and
Tom> implement things there?

How about we either drop the nonnull attribute or we use
-fno-delete-null-pointer-checks?

I personally feel that the gcc approach in this area is
counter-productive, at least for our purposes.  My view is that the
point of this stuff is to help us detect programming errors -- and we're
uninterested in using non-null-ness as some kind of optimization hint.
gcc seems to want it both ways, which seems bizarre.  But, given that
this is how the compiler works, IMO we should choose reliability
whichever way we best can.

thanks,
Tom

  parent reply	other threads:[~2021-07-28 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210726211101.ivychvbfgaafxjtz@lug-owl.de>
     [not found] ` <20210727100354.GB4037238@embecosm.com>
     [not found]   ` <b29d9d0b-f847-c0a0-9f09-d42d0f5e91df@suse.de>
     [not found]     ` <20210727113511.GC4037238@embecosm.com>
     [not found]       ` <6cf80ba9-b010-bb42-c92d-84e4f396813c@suse.de>
     [not found]         ` <b4da20e9-69a0-8b92-606d-ddf858539a66@suse.de>
2021-07-27 16:28           ` Tom de Vries
2021-07-28  9:28             ` Andrew Burgess
2021-07-28 15:31               ` Tom de Vries
2021-07-28 16:15             ` Tom Tromey [this message]
2021-07-28 22:32             ` Tom de Vries
2021-07-29 11:42               ` [master + 11][gdb/build] Disable attribute nonnull Tom de Vries
2021-07-29 17:30                 ` Tom Tromey
2021-07-30 10:16                 ` Andrew Burgess

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=87eebie7nt.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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).