public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/64604] [5 Regression] r212194 causes zsh miscompilation
Date: Thu, 15 Jan 2015 08:13:00 -0000	[thread overview]
Message-ID: <bug-64604-4-1HBOdxG3na@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64604-4@http.gcc.gnu.org/bugzilla/>

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	other threads:[~2015-01-15  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 21:48 [Bug preprocessor/64604] New: " trippels at gcc dot gnu.org
2015-01-15  8:13 ` trippels at gcc dot gnu.org [this message]
2015-01-15  8:15 ` [Bug preprocessor/64604] " jakub at gcc dot gnu.org
2015-01-15  8:18 ` trippels at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64604-4-1HBOdxG3na@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).