From: Jason Merrill <jason@redhat.com>
To: Marek Polacek <polacek@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c-family: ICE with -Wconversion and A ?: B [PR101030]
Date: Tue, 29 Mar 2022 22:23:56 -0400 [thread overview]
Message-ID: <7d4d71fe-5fa5-feee-1e2e-c1878be7a43e@redhat.com> (raw)
In-Reply-To: <YkNzN0ycsCLEMzeo@redhat.com>
On 3/29/22 16:59, Marek Polacek wrote:
> On Tue, Mar 29, 2022 at 04:53:21PM -0400, Marek Polacek via Gcc-patches wrote:
>> This patch fixes a crash in conversion_warning on a null expression.
>> It is null because the testcase uses the GNU A ?: B extension. We
>> could also use op0 instead of op1 in this case, but it doesn't seem
>> to be necessary.
>
> A related issue: we print
> warning: overflow in conversion from 'int' to 'char' changes value from '300' to '',''
> in the test in the patch. That's because the value is 44, it's type is char,
> and the ASCII value for ',' is 44. So I think we should convert values of char
> type to int for the diagnostic.
Sure.
next prev parent reply other threads:[~2022-03-30 2:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 20:53 Marek Polacek
2022-03-29 20:59 ` Marek Polacek
2022-03-30 2:23 ` Jason Merrill [this message]
2022-03-30 2:21 ` Jason Merrill
2022-03-30 14:22 ` Marek Polacek
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=7d4d71fe-5fa5-feee-1e2e-c1878be7a43e@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.com \
/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).