You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In code containing function-like macro overloading, for example:
#define RETERROR(x) return x
#define RETERROR(x,y) return x + 1
int test()
{
RETERROR(2);
}
Visual C++ compiler is able to processes this code, generating the C4003 warning (the missing argument being replaced by an empty string), while clang exits with an error "too few arguments provided to function-like macro invocation", being unable to process it and potentially making some Visual C++ projects uncompilable.
The text was updated successfully, but these errors were encountered:
It's not clear to me that we'll ever want to support this in Clang, because absolute compatibility with MSVC is not a goal for the project. If this shows up in platform headers somewhere, then it might be worth doing.
Extended Description
In code containing function-like macro overloading, for example:
#define RETERROR(x) return x
#define RETERROR(x,y) return x + 1
int test()
{
RETERROR(2);
}
Visual C++ compiler is able to processes this code, generating the C4003 warning (the missing argument being replaced by an empty string), while clang exits with an error "too few arguments provided to function-like macro invocation", being unable to process it and potentially making some Visual C++ projects uncompilable.
The text was updated successfully, but these errors were encountered: