C89中 序列点 与 自增符 的矛盾

l007i 2008-11-23 12:46:35
1
Between the previous and next sequence point an object shall have its stored value
modified at most once by the evaluation of an expression.
2
Furthermore, the prior value shall be read only to determine the value to be stored

比如
j = ++i;

这里是不是与第 2 点矛盾啊 对i 的read 不但用于了自增 还用于了赋值

请高手解答.谢谢
...全文
147 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
CN_CHINA 2008-12-05
  • 打赏
  • 举报
回复
学习,友情UP~
bheric87 2008-12-05
  • 打赏
  • 举报
回复
lbh2001说的对。我也遇到过这个问题。只能看汇编了
lbh2001 2008-11-25
  • 打赏
  • 举报
回复
这是前缀++的性质
至于序列点,看汇编代码才能确定其具体位置
pingzi_1119 2008-11-25
  • 打赏
  • 举报
回复
不好意思,我也不懂
友情up

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧