cpp crashes after "macro used with just one arg"
Jeffrey A Law
law@cygnus.com
Mon Dec 13 21:42:00 GMT 1999
In message <wsso565oxv.fsf@orcus.priv.at>you write:
>
> --=-=-=
>
> Hi,
>
> this is the cpp included with gcc-2.95 on i586-linux-2.2.10 (glibc
> 2.1.1). When fed this program
>
>
> --=-=-=
> Content-Type: text/x-c
> Content-Disposition: inline; filename=cpp-test.c
>
> #define TEST(F,E) do { printf("%s = %" #F "\n", #E, E) } while(0)
>
> int main()
> {
> TEST(unsetenv);
> }
>
> --=-=-=
>
>
> cpp outputs
> cpp-test.c:5: macro `TEST' used with just one arg
> and then crashes with a SIGSEGV.
>
> gdb neither delivered a sensible backtrace (only that the crash
> occured in chunk_free (libc?)), nor did the crash occur when stepping
> through the code. If gdb is not used, the bug is completely
> reproducible here.
I believe this bug has been fixed in the development sources.
Thanks,
jeff
More information about the Gcc-bugs
mailing list