public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/35859] New: preprocessor segfaults when #include directive passed to macro
@ 2008-04-07 19:23 kulhanek dot 5 at wright dot edu
2008-04-07 19:30 ` [Bug preprocessor/35859] " kulhanek dot 5 at wright dot edu
2008-04-16 16:58 ` tromey at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: kulhanek dot 5 at wright dot edu @ 2008-04-07 19:23 UTC (permalink / raw)
To: gcc-bugs
Build command: cat M
--
Summary: preprocessor segfaults when #include directive passed to
macro
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kulhanek dot 5 at wright dot edu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35859
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/35859] preprocessor segfaults when #include directive passed to macro
2008-04-07 19:23 [Bug preprocessor/35859] New: preprocessor segfaults when #include directive passed to macro kulhanek dot 5 at wright dot edu
@ 2008-04-07 19:30 ` kulhanek dot 5 at wright dot edu
2008-04-16 16:58 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: kulhanek dot 5 at wright dot edu @ 2008-04-07 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kulhanek dot 5 at wright dot edu 2008-04-07 19:29 -------
(oops, hit enter on the wrong screen)
Error message:
In file included from test.h:2:
test.def:2:2: warning: embedding a directive within macro arguments is not
portable
In file included from /usr/include/features.h:308,
from /usr/include/ctype.h:27,
from test.def:2,
from test.h:2:
g @/inc8
:8404883:10: <built-in>:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
make: *** [test] Error 1
Build command:
gcc --std=c99 -pedantic -E -P -x c test.h
An internal compiler error is still reported if -pedantic is removed, but it no
longer specifically mentions a segfault.
Source files:
-----test.h-----------------------------------
#define FOO(defs) /* ignored here */
#include "test.def"
----------------------------------------------
-----test.def---------------------------------
FOO(
#include <ctype.h>
)
----------------------------------------------
As with removing -pedantic from the build command, combining
the two files into one still yields the error, but only when
one is #included is the segfault reported.
gcc version:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
-----------------------------------------------
The fact that it's failing to compile is of course the fault of my code. But
since it's segfaulting instead of just returning an error message, I thought
I'd report it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35859
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/35859] preprocessor segfaults when #include directive passed to macro
2008-04-07 19:23 [Bug preprocessor/35859] New: preprocessor segfaults when #include directive passed to macro kulhanek dot 5 at wright dot edu
2008-04-07 19:30 ` [Bug preprocessor/35859] " kulhanek dot 5 at wright dot edu
@ 2008-04-16 16:58 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-04-16 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tromey at gcc dot gnu dot org 2008-04-16 16:57 -------
This works ok with 4.1 and with svn trunk.
So, I'm closing this, since 4.0 is a closed branch.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35859
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-16 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 19:23 [Bug preprocessor/35859] New: preprocessor segfaults when #include directive passed to macro kulhanek dot 5 at wright dot edu
2008-04-07 19:30 ` [Bug preprocessor/35859] " kulhanek dot 5 at wright dot edu
2008-04-16 16:58 ` tromey at gcc dot gnu dot org
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).