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

Joel Sherrill <joel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joel at gcc dot gnu.org

--- Comment #3 from Joel Sherrill <joel at gcc dot gnu.org> ---
>From my perspective, gcc needs to be reliable in reporting or not reporting
warnings. When you can't write code that is warning free across all targets, it
diminishes the value of the warning. Thanks for pointing out the code needs to
be fixed. That is great. But .. read on.. I think you blew this off without
considering how poorly gcc actually is doing on this warning. From what I can
tell, gcc misses this warning on 2/3 of our targets and when you fix the code,
has false positives on 1/3. And they aren't the same set. I would politely
request that we reopen and recast this PR in that light. 
|
gcc misses this on more targets than it catches it. It catches it on 6 of 18
targets. This is a pretty high false negative ratio. 

=== arm-rtems4.11-gcc - no warning
=== avr-rtems4.11-gcc - no warning
=== bfin-rtems4.11-gcc - no warning
=== h8300-rtems4.11-gcc - no warning
=== i386-rtems4.11-gcc - no warning
=== lm32-rtems4.11-gcc - no warning
=== m68k-rtems4.11-gcc - warning
=== m32c-rtems4.11-gcc - warning
=== m32r-rtems4.11-gcc - no warning
=== mips-rtems4.11-gcc - no warning
=== moxie-rtems4.11-gcc - no warning
=== nios2-rtems4.11-gcc - no warning
=== or1k-rtems4.11-gcc - no warning
=== powerpc-rtems4.11-gcc - warning
=== sh-rtems4.11-gcc - warning
=== sparc64-rtems4.11-gcc - no warning
=== sparc-rtems4.11-gcc - warning
=== v850-rtems4.11-gcc - warning

The test case is a cut down from the port of the FreeBSD hexdump command to
RTEMS. I checked the current source at
http://svnweb.freebsd.org/base/head/usr.bin/hexdump/conv.c?revision=247753&view=markup
and it uses %C at line 137 for the specifier. Modifying the test case
accordingly, this changed the set of targets which gives a warning. Now 12
report it and 6 don't. It is a different set. This is with %C:

=== arm-rtems4.11-gcc - no warning
=== avr-rtems4.11-gcc - no warning
=== bfin-rtems4.11-gcc - no warning
=== h8300-rtems4.11-gcc - no warning
=== i386-rtems4.11-gcc - no warning
=== lm32-rtems4.11-gcc - no warning
=== m68k-rtems4.11-gcc - warning
=== m32c-rtems4.11-gcc - warning
=== m32r-rtems4.11-gcc - no warning
=== mips-rtems4.11-gcc - no warning
=== moxie-rtems4.11-gcc - no warning
=== nios2-rtems4.11-gcc - no warning
=== or1k-rtems4.11-gcc - no warning
=== powerpc-rtems4.11-gcc - warning
=== sh-rtems4.11-gcc - warning
=== sparc64-rtems4.11-gcc - no warning
=== sparc-rtems4.11-gcc - warning
=== v850-rtems4.11-gcc - warning

Reply via email to