preprocessor/2654: Bug with miltiple args. #DEFINE - causes cpp to SIGSEGV

bug-in-gcc@kivc.vstu.vinnica.ua bug-in-gcc@kivc.vstu.vinnica.ua
Thu Apr 26 05:16:00 GMT 2001


>Number:         2654
>Category:       preprocessor
>Synopsis:       Bug with miltiple args. #DEFINE - causes cpp to SIGSEGV
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 26 05:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Bohdan Vlasyuk (myself)
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Linux rh-clone (Black Cat, versions don't differ) 6.2
$ rpm -qa|grep egcs
egcs-1.1.2-30 egcs-c++-1.1.2-30
$ uname -a
Linux kivc.vstu.vinnica.ua 2.2.18 #9 Wed Feb 14 13:38:20 EET 2001 i686 unknown
>Description:
Hi !!!

What I am doing is 

$ gcc test.cpp
gcc: Internal compiler error: program cpp got fatal signal 11
$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

The actual file test.cpp is:

#define DEB(y,x...) fprintf(stderr, #x" = "#y"\n",x)
void main(void)
{
        int fromblock;
        DEB(toblock)
}

Well, I know that the problem is with wrong args. number to
the macro I define, however, SIGSEGV is a strange way to report 
errors, isn't it ??

WBR, Bohdan.
>How-To-Repeat:
#define DEB(y,x...) fprintf(stderr, #x" = "#y"\n",x)
void main(void)
{
        int fromblock;
        DEB(toblock)
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list