c++/9891: #error does not expand macros

stephen@rabbit.eng.miami.edu stephen@rabbit.eng.miami.edu
Fri Feb 28 21:26:00 GMT 2003

>Number:         9891
>Category:       c++
>Synopsis:       #error does not expand macros
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 28 21:26:00 UTC 2003
>Originator:     GCC
>Release:        gcc version 2.95.4 20020320 [FreeBSD]
#error does not expand macros. This program

 > #include <stdio.h>
 > #define ABCD the cat sat on the mat
 > #error ABCD
 > void main(void)
 > { }


 > x.cpp:5: #error ABCD

instead of

 > x.cpp:5: #error the cat sat on the mat
CC compile that program. No special options,
gcc with standard install
no idea.

More information about the Gcc-bugs mailing list