Hi Martin,

On 23/09/16 17:17, Martin Sebor wrote:
On 09/23/2016 09:42 AM, Thomas Preudhomme wrote:
Sorry, forgot the patch. Please find it attached.

Best regards,

Thomas

On 23/09/16 16:40, Thomas Preudhomme wrote:
Hi,

New builtin-sprintf-warn-1.c testcase contains a few regex of the form
"\[0-9\]+
bytes" or ". bytes". This does not account for the case where the
number of byte
is 0 in which case byte would be in the singular form. This caused a
FAIL on
arm-none-eabi targets. This patch makes the s optional in all cases
where the
number of bytes is unknown.

I did not commit this fix as obvious as people might want to only do
the changes
for lines where the number of bytes *could* be 0 so I prefer to get
review.

Thanks for the patch.  The %p fixes look correct to me (someone
else needs to approve the final patch).

For the INT_MAX tests, I think it's a sign of a bug in the pass if
for the following call

  sprintf (buf, "X%*c", INT_MAX, '1');

GCC prints

  warning: directive output of 0 byte causes result to exceed 'INT_MAX'

I only had a failed warning on line 101:

T (0, "%p", (void*)0x1); /* { dg-warning ".%p. directive writing . bytes into a region of size 0" } */

The other were fine. I just changed all the one that were using . or explicitely including 0 when matching the amount of bytes. I did not look into which one make sense to be 0 which is why I wanted review.

I'm happy to just keep the %p ones (or even only the one with 0, "%p") if you think that's the only one that needs it.

Best regards,

Thomas

Reply via email to