public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@linaro.org>
To: Martin Sebor <msebor@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>, Jeff Law <law@redhat.com>,
		Jakub Jelinek <jakub@redhat.com>,
	Joseph Myers <joseph@codesourcery.com>,
		Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] have -Wformat-overflow handle -fexec-charset (PR 80503)
Date: Wed, 03 May 2017 15:24:00 -0000	[thread overview]
Message-ID: <CAKdteObOFzUWi5MczPvdo35rU1WTLWQf9dVW62LNNotqur6gmA@mail.gmail.com> (raw)
In-Reply-To: <28dc348f-054d-1b1b-6600-2b3f048ebaf2@gmail.com>

On 3 May 2017 at 16:54, Martin Sebor <msebor@gmail.com> wrote:
> On 05/03/2017 08:22 AM, Christophe Lyon wrote:
>>
>> Hi,
>>
>>
>> On 29 April 2017 at 19:56, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>>
>>> On Apr 28 2017, Martin Sebor <msebor@gmail.com> wrote:
>>>
>>>> +void test_width_and_precision_out_of_range (char *d)
>>>> +{
>>>> +#if __LONG_MAX__ == 2147483647
>>>> +#  define   MAX_P1_STR "2147483648"
>>>> +#elif __LONG_MAX__ == 9223372036854775807
>>>> +#  define MAX_P1_STR "9223372036854775808"
>>>> +#endif
>>>> +
>>>> +  T ("%" MAX_P1_STR "i", 0);    /* { dg-warning "width out of range" }
>>>> */
>>>> +  /* { dg-warning "result to exceed .INT_MAX. " "" { target *-*-* } .-1
>>>> } */
>>>> +  T ("%." MAX_P1_STR "i", 0);   /* { dg-warning "precision out of
>>>> range" } */
>>>
>>>
>>> FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line
>>> 123)
>>> FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line
>>> 125)
>>> FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c (test for excess errors)
>>> Excess errors:
>>>
>>> /daten/aranym/gcc/gcc-20170429/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:125:3:
>>> warning: '%.2147483648i' directive output of 2147483648 bytes causes result
>>> to exceed 'INT_MAX' [-Wformat-overflow=]
>>>
>>> Andreas.
>>
>>
>> I've noticed the same errors on arm* targets, if it's easier to reproduce.
>
>
> Thanks.  I committed a trivial fix for this on Monday
> (https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00036.html).
> I don't see the failures in recent test results for the few
> ILP32 targets I've checked so I'm hoping they're gone but if
> they persist on some others please let me know.
>
Indeed, I confirm your commit r247444 fixed the error.
I didn't notice your message because it was in a different thread.

Thanks,

Christophe

> Martin

  reply	other threads:[~2017-05-03 15:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 22:27 Martin Sebor
2017-04-27  3:39 ` Joseph Myers
2017-04-27  5:07   ` Jakub Jelinek
2017-04-27 22:52     ` Martin Sebor
2017-04-28 16:35       ` Jeff Law
2017-04-28 16:37         ` Jakub Jelinek
2017-04-28 17:05           ` Jeff Law
2017-04-28 18:32         ` Martin Sebor
2017-04-28 19:14           ` Jeff Law
2017-04-29 20:44           ` Andreas Schwab
2017-05-03 14:35             ` Christophe Lyon
2017-05-03 15:02               ` Martin Sebor
2017-05-03 15:24                 ` Christophe Lyon [this message]
2017-06-02 15:38                   ` Renlin Li
2017-06-04 22:24                     ` Martin Sebor
2017-06-13  8:16                       ` Renlin Li
2017-06-20 11:00                         ` Renlin Li
2018-01-31 17:57                           ` Renlin Li
2018-02-01  0:41                             ` Martin Sebor
2018-02-01 11:54                               ` Renlin Li
2018-02-01 18:27                                 ` Martin Sebor

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=CAKdteObOFzUWi5MczPvdo35rU1WTLWQf9dVW62LNNotqur6gmA@mail.gmail.com \
    --to=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=law@redhat.com \
    --cc=msebor@gmail.com \
    --cc=schwab@linux-m68k.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).