It seems to me that this function would not be valid since it uses the keyword 'default' as an identifier:
int foo()
{
int default = 42;
return default;
}
However, the Microsoft C++ compiler (versions 14.00.50727.762 and 15.00.30729.0) compile the code without warnings or errors (using the simplest possible command line: 'cl foo.cpp').
Dev-C++ 4.9.9.2 does generate errors when compiling the function.
This seems like such an obvious problem that I must be overlooking something.
Edit: litb dug up the Duplicate for this question Default as a variable name.