c++/1092: gcc failed to compile multiline macro define

joseft@optimod.co.il joseft@optimod.co.il
Tue Dec 19 03:36:00 GMT 2000


>Number:         1092
>Category:       c++
>Synopsis:       gcc failed to compile multiline macro define
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 19 03:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Yossi Tanger
>Release:        egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:

>Description:
the compiler reject a simple macro multiline definition
the error notification is: "stray '\' in program"
>How-To-Repeat:
invoke gcc -c -o def.o def.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="def.cpp"
Content-Disposition: inline; filename="def.cpp"

#include <stdio.h>
#define HELLO hello world \
              hello world \
              coco
void main()
{
  printf(" HELLO\n");
}


More information about the Gcc-bugs mailing list