With this code:
#include
int main(int argc, char *argv[])
{
return 0;
}
/** run2: A macro to call a function. */
#define run2( functi
The following code generates the same warning under g++ 4.3.4 and g++ 4.5.1:
int main() {}
#define X \
Y
I must say I don't understand why. But you can get rid of the warning by adding an empty line at the end of the file.
Incidentally, this compiles without a warning, even without an empty last line:
int main() {}
#define X Y
So it looks like a pre-processor bug to me.
Edited to add: OK, not a bug as such. See my other answer for a more considered view.