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

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Turned out that an awk script doesn't handle the new preprocessor comments:

markus@x4 Src % cat sigtmp.c
#include <signal.h>

XXNAMES XXSIGHUP SIGHUP
XXNAMES XXSIGINT SIGINT
XXNAMES XXSIGQUIT SIGQUIT
XXNAMES XXSIGILL SIGILL
XXNAMES XXSIGTRAP SIGTRAP
XXNAMES XXSIGABRT SIGABRT
XXNAMES XXSIGIOT SIGIOT
XXNAMES XXSIGBUS SIGBUS
XXNAMES XXSIGFPE SIGFPE
XXNAMES XXSIGKILL SIGKILL
XXNAMES XXSIGUSR1 SIGUSR1
XXNAMES XXSIGSEGV SIGSEGV
XXNAMES XXSIGUSR2 SIGUSR2
XXNAMES XXSIGPIPE SIGPIPE
XXNAMES XXSIGALRM SIGALRM
XXNAMES XXSIGTERM SIGTERM
XXNAMES XXSIGSTKFLT SIGSTKFLT
XXNAMES XXSIGCLD SIGCLD
XXNAMES XXSIGCHLD SIGCHLD
XXNAMES XXSIGCONT SIGCONT
XXNAMES XXSIGSTOP SIGSTOP
XXNAMES XXSIGTSTP SIGTSTP
XXNAMES XXSIGTTIN SIGTTIN
XXNAMES XXSIGTTOU SIGTTOU
XXNAMES XXSIGURG SIGURG
XXNAMES XXSIGXCPU SIGXCPU
XXNAMES XXSIGXFSZ SIGXFSZ
XXNAMES XXSIGVTALRM SIGVTALRM
XXNAMES XXSIGPROF SIGPROF
XXNAMES XXSIGWINCH SIGWINCH
XXNAMES XXSIGPOLL SIGPOLL
XXNAMES XXSIGIO SIGIO
XXNAMES XXSIGPWR SIGPWR
XXNAMES XXSIGSYS SIGSYS
XXNAMES XXSIGUNUSED SIGUNUSED
XXNAMES XXSIGRTMIN _SIGRTMIN

markus@x4 Src % gcc-4.9 -E sigtmp.c >|sigtmp.out
markus@x4 Src % gcc-5 -E sigtmp.c >|sigtmp_.out
markus@x4 Src % diff -u sigtmp.out sigtmp_.out
--- sigtmp.out  2015-01-15 09:09:41.899667049 +0100
+++ sigtmp_.out 2015-01-15 09:09:45.209590084 +0100
@@ -25,6 +25,8 @@

 # 1 "/usr/include/bits/sigset.h" 1 3 4
 # 22 "/usr/include/bits/sigset.h" 3 4
+
+# 22 "/usr/include/bits/sigset.h" 3 4
 typedef int __sig_atomic_t;


@@ -741,8 +743,8 @@



-# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/stddef.h" 1 3 4
-# 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/stddef.h" 3 4
+# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/5.0.0/include/stddef.h" 1 3 4
+# 216 "/usr/lib/gcc/x86_64-pc-linux-gnu/5.0.0/include/stddef.h" 3 4
 typedef long unsigned int size_t;
 # 343 "/usr/include/signal.h" 2 3 4

@@ -1031,39 +1033,181 @@

 # 2 "sigtmp.c" 2

-XXNAMES XXSIGHUP 1
-XXNAMES XXSIGINT 2
-XXNAMES XXSIGQUIT 3
-XXNAMES XXSIGILL 4
-XXNAMES XXSIGTRAP 5
-XXNAMES XXSIGABRT 6
-XXNAMES XXSIGIOT 6
-XXNAMES XXSIGBUS 7
-XXNAMES XXSIGFPE 8
-XXNAMES XXSIGKILL 9
-XXNAMES XXSIGUSR1 10
-XXNAMES XXSIGSEGV 11
-XXNAMES XXSIGUSR2 12
-XXNAMES XXSIGPIPE 13
-XXNAMES XXSIGALRM 14
-XXNAMES XXSIGTERM 15
-XXNAMES XXSIGSTKFLT 16
-XXNAMES XXSIGCLD 17
-XXNAMES XXSIGCHLD 17
-XXNAMES XXSIGCONT 18
-XXNAMES XXSIGSTOP 19
-XXNAMES XXSIGTSTP 20
-XXNAMES XXSIGTTIN 21
-XXNAMES XXSIGTTOU 22
-XXNAMES XXSIGURG 23
-XXNAMES XXSIGXCPU 24
-XXNAMES XXSIGXFSZ 25
-XXNAMES XXSIGVTALRM 26
-XXNAMES XXSIGPROF 27
-XXNAMES XXSIGWINCH 28
-XXNAMES XXSIGPOLL 29
-XXNAMES XXSIGIO 29
-XXNAMES XXSIGPWR 30
-XXNAMES XXSIGSYS 31
-XXNAMES XXSIGUNUSED 31
+
+# 3 "sigtmp.c"
+XXNAMES XXSIGHUP 
+# 3 "sigtmp.c" 3 4
+                1
+
+# 4 "sigtmp.c"
+XXNAMES XXSIGINT 
+# 4 "sigtmp.c" 3 4
+                2
...

And then the awk scrip generates a bogus signames.c file:

 % gawk -f ./signames2.awk sigtmp.out >| signames.c

Reply via email to