| Summary: | [3.4 Regression] #ident stopped working | ||
|---|---|---|---|
| Product: | gcc | Reporter: | marty leisner <leisner> |
| Component: | c | Assignee: | Drea Pinski <pinskia> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gcc-bugs, sobomax |
| Priority: | P2 | Keywords: | patch, wrong-code |
| Version: | 3.4.0 | ||
| Target Milestone: | 3.4.3 | ||
| Host: | i686-linux-gnu | Target: | i686-linux-gnu |
| Build: | Known to work: | 3.3.3 4.0.0 | |
| Known to fail: | 3.4.0 | Last reconfirmed: | 2004-08-12 06:01:47 |
| Attachments: | bug with gcc 3.4.1 | ||
|
Description
marty leisner
2004-08-12 04:14:26 UTC
Created attachment 6917 [details]
bug with gcc 3.4.1
It works for me on 3.4.0: tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_4/bin/gcc -S -o - pr16999.c -v Reading specs from /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/specs Configured with: ../configure --prefix=/home/gates/pinskia/ia32_linux_gcc3_4 --enable-__cxa_atexit Thread model: posix gcc version 3.4.0 /home/gates/pinskia/ia32_linux_gcc3_4/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1 -quiet -v pr16999.c -quiet -dumpbase pr16999.c -mtune=pentiumpro -auxbase-strip - -version -o - ignoring nonexistent directory "/home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/ 3.4.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /home/gates/pinskia/ia32_linux_gcc3_4/include /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/include /usr/include End of search list. GNU C version 3.4.0 (i686-pc-linux-gnu) compiled by GNU C version 3.4.0. GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128866 .file "pr16999.c" .ident "this is an ident" #APP .ident "trying asm " .section .note.GNU-stack,"",@progbits .ident "GCC: (GNU) 3.4.0" (In reply to comment #2) > It works for me on 3.4.0: > tin:~/src/gnu/gcctest>~/ia32_linux_gcc3_4/bin/gcc -S -o - pr16999.c -v > Reading specs from /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/specs > Configured with: ../configure --prefix=/home/gates/pinskia/ia32_linux_gcc3_4 --enable-__cxa_atexit > Thread model: posix > gcc version 3.4.0 > /home/gates/pinskia/ia32_linux_gcc3_4/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1 -quiet -v > pr16999.c -quiet -dumpbase pr16999.c -mtune=pentiumpro -auxbase-strip - -version -o - > ignoring nonexistent directory "/home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/ > 3.4.0/../../../../i686-pc-linux-gnu/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/local/include > /home/gates/pinskia/ia32_linux_gcc3_4/include > /home/gates/pinskia/ia32_linux_gcc3_4/lib/gcc/i686-pc-linux-gnu/3.4.0/include > /usr/include > End of search list. > GNU C version 3.4.0 (i686-pc-linux-gnu) > compiled by GNU C version 3.4.0. > GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128866 > .file "pr16999.c" > .ident "this is an ident" > #APP > .ident "trying asm " > .section .note.GNU-stack,"",@progbits > .ident "GCC: (GNU) 3.4.0" try it with -save-temps -- this seems to have a bearing... With -save-temps, we also get: foo.c:1:10: warning: extra tokens at end of #ident directive Confirmed, interesting. Postponed until GCC 3.4.3. *** Bug 17206 has been marked as a duplicate of this bug. *** Note that was a simple patch in 17206 for fixing the problem:
--- src/contrib/gcc/c-ppoutput.c 2004/08/26 14:10:04 1.1
+++ src/contrib/gcc/c-ppoutput.c 2004/08/26 14:10:32
@@ -292,7 +292,7 @@
const cpp_string *str)
{
maybe_print_line (print.map, line);
- fprintf (print.outf, "#ident \"%s\"\n", str->text);
+ fprintf (print.outf, "#ident %s\n", str->text);
print.line++;
}
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00756.html>. Mine. Subject: Bug 16999 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2004-10-08 18:37:08 Modified files: gcc : ChangeLog c-ppoutput.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg/cpp: ident-1.c Log message: 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> PR c/16999 * c-ppoutput.c (cb_ident): Don't quote string as it is already quoted. * gcc.dg/cpp/ident-1.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5809&r2=2.5810 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-ppoutput.c.diff?cvsroot=gcc&r1=1.22&r2=1.23 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4413&r2=1.4414 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/ident-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 Fixed on the mainline, will commit the patch to 3.4 branch once I get home. Fixed. Subject: Bug 16999 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: pinskia@gcc.gnu.org 2004-10-09 00:25:11 Modified files: gcc : ChangeLog c-ppoutput.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg/cpp: ident-1.c Log message: 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> * gcc.dg/cpp/ident-1.c: New test. 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> PR c/16999 * c-ppoutput.c (cb_ident): Don't quote string as it is already quoted. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.650&r2=2.2326.2.651 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-ppoutput.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.11.12.2&r2=1.11.12.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.280&r2=1.3389.2.281 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/ident-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.2.1 |