Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error when expanding macro with __VA_ARGS__

807575Jun 1 2006 — edited Jun 1 2006
SUN experts:-)
I define a macro to implement some specific functionality..see following..
#define log( ... ) log2( __FILE__, __LINE__, __VA_ARGS__ )

When expanding macro with class operator ::, "::" will be converted into ":". Very strange...
For example,
log( "%s", A::name())
After preprocessing,
log(.., .. , "%s", A:name())

As we can see, after preprocessing, this can not compile yet...

my CC compiler version:
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-11 2002/10/31

Is it a known bug?
Is there some patch i need to put to fix this bug?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2006
Added on Jun 1 2006
2 comments
449 views