What does the provided example do?
5) Surprising math:
int x = 0xfffe+0x0001;
5) Surprising math:
int x = 0xfffe+0x0001;
It's trying to parse the e as scientific notation I think.
surprising_math.c: In function ‘main’:
surprising_math.c:4:10: error: invalid suffix "+0x0001" on integer constant
int x = 0xfffe+0x0001;
^~~~~~~~~~~~~Edit: Clang also gives an error. Mscv seems to compile. I wonder who follows spec. I assume not mscv ...
I'm sure it could have been made stricter, allowing 0xfffe+0x0001 to be treated as 0xfffe + 0x0001 -- but the solution is simply to write 0xfffe + 0x0001 in the first place. The language grammar has to be consistently defined even if it leads to surprises now and then.
error: invalid suffix '+0x0001' on integer constant