This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
标准被忽视了。
这并不矛盾。
澄清:
C11,6.5.3.4 sizeof 和 _Alignof 运算符,语义,3(添加强调):
这意味着
不进行评估
。
因此,
f()
不会被调用。额外:ICC 错误地产生错误:
此处允许函数调用 is 因为这样的函数调用是
The standard was overlooked.
There is no contradiction.
To clarify:
C11, 6.5.3.4 The sizeof and _Alignof operators, Semantics, 3 (emphasis added):
It means that in
the
is not evaluated.
Hence, the
f()
is not called.Extra: ICC incorrectly produces an error:
Here the function call is allowed because such funtion call is