preprocessor/962: Recursive expansion fails

marcus@idonex.se marcus@idonex.se
Sat Dec 2 14:26:00 GMT 2000


>Number:         962
>Category:       preprocessor
>Synopsis:       Recursive expansion fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 02 14:26:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     marcus@idonex.se
>Release:        GNU CPP version 2.97 20001127 (experimental) (cpplib) (Hitachi SH)
>Organization:
>Environment:
Solaris 8
>Description:
Running gcc -E on

#define foobar(n) [n]
#define X foobar
X(X)
X(X(Y))

yields

[X]
[X(Y)]

but should yield

 [foobar]
 [ [Y]]

However, running gcc -E on

#define foobar(n) [n]
#define X foobar
#define X2 foobar
X(X2)
X(X2(Y))

gives the correct result.  It therefore seems that some
faulty anti-recursion check causes the problem.
>How-To-Repeat:

>Fix:

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


More information about the Gcc-prs mailing list