preprocessor/2900: Does not handle concatenation of macros properly
sean@mcneil.com
sean@mcneil.com
Tue May 22 11:16:00 GMT 2001
>Number: 2900
>Category: preprocessor
>Synopsis: Does not handle concatenation of macros properly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 22 11:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Sean McNeil
>Release: 3.1 20010522 (experimental)
>Organization:
>Environment:
Linux 2.4.2 host OS cross to arm-wrs-vxworks
>Description:
The cpp does not properly handle the concatenation (##) in macros. This is a regression in cpp from gcc 2.95.3. Attached is a short example that produces the error.
>How-To-Repeat:
Attempt to compile:
arm-wrs-vxworks-gcc -c cpp_recurse.c
cpp_recurse.c:21:5: warning: pasting "PUSH_VALUES2" and "(" does not give a valid preprocessing token
with version 2.95.3 all is well.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="cpp_recurse.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cpp_recurse.c"
CnZvaWQgKiptY19zdGFja19wdHI7CgojZGVmaW5lIFJFQ1VSU0UoaGFuLCBsYWJlbCwgY291bnQs
IHNhdmVzLCBjbGVhbnVwKSAgXAogICAgIHsgIHZvaWQgKipuZXcgPSBtY19zdGFja19wdHIgKyBj
b3VudCArIDE7ICAgICAgXAogICAgICAgIFBVU0hfVkFMVUVTICMjIGNvdW50ICMjIHNhdmVzOyAg
ICAgICAgICAgICAgXAogICAgIH0KCiNkZWZpbmUgUFVTSF9WQUxVRVMyKHR5cGUxLCB2YXIxLCB0
eXBlMiwgdmFyMikgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICBQVVNIX1ZBTFVFUzEo
dHlwZTEsIHZhcjEpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc
CiAgICAqbWNfc3RhY2tfcHRyKysgPSAodm9pZCAqKXZhcjI7CgojZGVmaW5lIFBVU0hfVkFMVUVT
MSh0eXBlMSwgdmFyMSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAog
ICAgKm1jX3N0YWNrX3B0cisrID0gKHZvaWQgKil2YXIxOwoKdm9pZCBjcHBfdGVzdCAodm9pZCkK
ewogICAgdm9pZCAqY2IsICpoOwogICAgaW50IHBhcmVudE1hcms7CgogICAgUkVDVVJTRShjYiwg
ImxhYmVsIiwgMiwgKHZvaWQgKiwgaCwgaW50LCBwYXJlbnRNYXJrKSwgY2IpOwp9Cg==
More information about the Gcc-prs
mailing list