c++/436: preprocessor instruction causes parse errors and syntax errors

carlson14@llnl.gov carlson14@llnl.gov
Fri Jul 28 20:36:00 GMT 2000


>Number:         436
>Category:       c++
>Synopsis:       preprocessor instruction causes parse errors and syntax errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 28 20:36:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     carlson14@llnl.gov
>Release:        gcc-2.95.2 & gcc-2.95.1
>Organization:
>Environment:
sparc-sun-solaris2.7 ultra 10
>Description:
The attached file doesn't compile.  A mixture between
the preprocessor result and the C++ class mixes
things up.  This is simplified from a larger example from
omniORB (omnithread.h).  The preprocessor instruction
is in the file to show what a comes out of the
preprocessor.
>How-To-Repeat:
gcc the file
>Fix:
Work around is to use -P, but this may cause problems with
shared objects (_vt. symbols left undefined in object file???)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="A.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="A.cc"

LyogClZlcnNpb246IEdDQyAyLjk1LjEgJiBHQ0MgMi45NS4yClN5c3RlbTogU29sYXJpcyAyLjcK
T3B0aW9uczogbm9uZQpQYXJ0aWFsIHdvcmsgYXJvdW5kOiB1c2UgLVAsIGJ1dCBjYXVzZXMgdmly
dHVhbCB0YWJsZSB0byBiZSBsZWZ0IHVuZGVjbGFyZWQ/PwoqLwoKLyoKICogVGhpcyBwcmVwcm9j
ZXNzb3IgaW5zdHJ1Y3Rpb24gaXMgb25lIHJlYXNvbgogKiB3aHkgdGhpcyBmaWxlIGZhaWxzIHRv
IGNvbXBpbGUgd2l0aCBhIHBhcnNlCiAqIGVycm9yIGFuZCBhIHN5bnRheCBlcnJvcgogKi8KIyAx
ICJBLmgiIDEgMyA0CmNsYXNzIEEgewpwdWJsaWM6CiAgICBBKHZvaWQpOwogICAgfkEodm9pZCk7
CiAgICBBKGNvbnN0IEEmKTsKICAgIEEmIG9wZXJhdG9yPShjb25zdCBBJik7Cn07Cg==


More information about the Gcc-prs mailing list