MSVC++ from 2003 to 2008 and comeau compiler v4.9.3b gives no errors about that: //--------------------------------------------- #define CAT(a,b) a ## b
void foo(int a) {} void foo(int a,int b) {} int main() { CAT(foo,(1)); //error CAT(foo,(1,2)); //error return 0; } //--------------------------------------------- -- Summary: Pasting "foo" and "(" does not give a valid preprocessing token Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andry at inbox dot ru GCC host triplet: i686-pc-cygwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35610