https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |msebor at gcc dot gnu.org
Known to work| |5.3.0, 6.3.0, 7.0
Resolution|--- |FIXED
Known to fail| |3.3
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
This works as expected with GCC 7, 6, and 5. Bisection points to r186972 or a
nearby commit as the fix.
$ (set -x && cat t.h && cat t.c && gcc -S -Wall -Wextra -Wpedantic
-Wold-style-cast -I. -xc++ t.c)
+ cat t.h
#pragma GCC system_header
#define NOTHING (int) 0
+ cat t.c
#include <t.h>
int i = NOTHING;
int j = (int) 0;
+ gcc -S -Wall -Wextra -Wpedantic -Wold-style-cast -I. -xc++ t.c
t.c:4:15: warning: use of old-style cast [-Wold-style-cast]
int j = (int) 0;
^