Hacker News new | ask | show | jobs
by minipci1321 3337 days ago
> I can't think of any C syntax that's not valid C++,

enum toto { a = 1 }; enum toto b = 1;

Fixing versions of both standards could bring in more examples (like trailing comma in enums and use of the names reserved in C++, by the C code).

Overall, ironically, as typing is stronger in C++ (which I agree is a non-syntactic change), poor C code (using lots of unjustified casts), will require less modifications to be compiled as C++.

1 comments

Thanks for the example!