Why does sizeof(x)++ compile? [duplicate]
问题 This question already has answers here : Why does sizeof(x++) not increment x? (9 answers) Closed 6 days ago . I have run into the following code snippet: int a = 3; printf("%d", sizeof(a)++); Apparently this will compile with GCC 9.3.0 and -std=c99. While this does not compile: printf("%d", sizeof(3)++); GCC prints an error error: lvalue required as increment operand Before I have compiled the first snippet I would have expected such an error. The operand of the postfix ++ operator shall be