From: Nathan Sidwell <nathan@acm.org>
To: David Malcolm <dmalcolm@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 2/2] C++: bulletproof the %H and %I format codes (PR c++/81167)
Date: Tue, 27 Jun 2017 12:43:00 -0000 [thread overview]
Message-ID: <22480c4e-393d-35fb-dd73-ebee44ceb0f9@acm.org> (raw)
In-Reply-To: <1498177241-34129-2-git-send-email-dmalcolm@redhat.com>
On 06/22/2017 08:20 PM, David Malcolm wrote:
> PR c++/81167 reports a case where a NULL is passed to one of these %qH,
> and it turns out that we now ICE for this case (with a gcc_assert)
> whereas previously we printed a '' for the type >
> This patch slightly reworks the %H and %I-handling code so that it
> gracefully handles NULL, fixing the ICE in that PR.
> Whilst I was at it, I also fixed things so that if only one of the
> %H/%I codes is present, we do the right thing (i.e. fall back to
> the %T behavior).
I dislike this kind of silently accepting bogus use of an interface. I
much prefer the compiler to explode.
At least make it barf with a checking build, even if a production build
permits the abuse.
nathan
--
Nathan Sidwell
next prev parent reply other threads:[~2017-06-27 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 23:47 [PATCH 1/2] Support C++-specific selftests David Malcolm
2017-06-22 23:47 ` [PATCH 2/2] C++: bulletproof the %H and %I format codes (PR c++/81167) David Malcolm
2017-06-27 12:43 ` Nathan Sidwell [this message]
2017-06-30 15:57 ` [PATCH 1/2] Support C++-specific selftests Jeff Law
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=22480c4e-393d-35fb-dd73-ebee44ceb0f9@acm.org \
--to=nathan@acm.org \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@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).