[Bug objc/53345] some OPT_Wformat is enabled by default

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 27 16:02:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53345

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-07-27
                 CC|                            |egallager at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #1)
> This affects in particular the objc FE:
> 
> Executing on host: /home/manuel/test4/187442M/build/gcc/xgcc
> -B/home/manuel/test4/187442M/build/gcc/
> /home/manuel/test4/src/gcc/testsuite/gcc.dg/warn-nsstring.c 
> -fno-diagnostics-show-caret    -ansi -pedantic-errors -S  -m32 -o
> warn-nsstring.s    (timeout = 300)
> FAIL: gcc.dg/warn-nsstring.c  (test for warnings, line 4)
> FAIL: gcc.dg/warn-nsstring.c  (test for warnings, line 5)
> PASS: gcc.dg/warn-nsstring.c (test for excess errors)

I can't reproduce with that exact command, but I can if I force Objective-C:

$ /usr/local/bin/gcc -fno-diagnostics-show-caret    -ansi -pedantic-errors -S 
-m32 -o warn-nsstring.s
/private/var/root/gcc-git/gcc/testsuite/gcc.dg/warn-nsstring.c 
$ /usr/local/bin/gcc -x objective-c -fno-diagnostics-show-caret -c -ansi
-pedantic-errors -S  -m32 -o warn-nsstring.s
/private/var/root/gcc-git/gcc/testsuite/gcc.dg/warn-nsstring.c 
/private/var/root/gcc-git/gcc/testsuite/gcc.dg/warn-nsstring.c:4:1: error:
format string argument is not a string type
/private/var/root/gcc-git/gcc/testsuite/gcc.dg/warn-nsstring.c:5:1: error:
format string argument is not a string type
$

So, confirmed since the 2nd command errors.


More information about the Gcc-bugs mailing list