Bug 98982

Summary: preprocessor collate, ## follow by ::
Product: [Retired] Red Hat Raw Hide Reporter: Gilles J. Seguin <segg.gill>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-11 11:12:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
c++ testcase none

Description Gilles J. Seguin 2003-07-11 10:59:53 UTC
Description of problem:
preprocessor fail with error on
#define TEST(name) name##::B()
with error message
test10.cxx:13:17: pasting "C" and "::" does not give a valid preprocessing token

Version-Release number of selected component (if applicable):
gcc-3.3-12

How reproducible:
Every time

Steps to Reproduce:
1. g++ -c test10.cpp -o test10.o
2.
3.
    
Actual results:
we have the following error
test10.cxx:13:17: pasting "C" and "::" does not give a valid preprocessing token

Expected results:
The macro used to succeed in performing the collate
when follow by ::

Additional info:
see test case attachment

Comment 1 Gilles J. Seguin 2003-07-11 11:07:34 UTC
Created attachment 92878 [details]
c++ testcase

Comment 2 Jakub Jelinek 2003-07-11 11:12:09 UTC
Your testcase is buggy, please read ISO C++ 98.
If you remove ## from the testcase, it should work just fine.