This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196216 - wrong macro expansion of ## args
Summary: wrong macro expansion of ## args
Status: RESOLVED DUPLICATE of bug 195560
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 09:29 UTC by Alexander Simon
Modified: 2011-03-03 10:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-03-03 09:29:37 UTC
Code example:
---------------8<--------------------
#define LOG(args...) fprintf(stderr, ## args)
int foo(char * env_map, char * env_log) {
    LOG("\n>>>NBBUILD: TOOLS=%s\n\tLOG=%s\n", env_map, env_log);
}
---------------8<--------------------
Actual expansion is:

int foo(char * env_map, char * env_log) {
    fprintf(stderr ,"\n>>>NBBUILD: TOOLS=%s\n\tLOG=%s\n" );
}

Expected expansion is:

int foo(char * env_map, char * env_log) {
    fprintf(stderr ,"\n>>>NBBUILD: TOOLS=%s\n\tLOG=%s\n", env_map, env_log);
}
Comment 1 Alexander Simon 2011-03-03 09:32:48 UTC
P2 because data lost in macro expander code.
Comment 2 Vladimir Voskresensky 2011-03-03 10:38:40 UTC

*** This bug has been marked as a duplicate of bug 195560 ***