avva: (Default)
[personal profile] avva
Комменты о чем угодно.

Хотите об этом поговорить?

Date: 2010-06-09 09:53 am (UTC)
From: (Anonymous)
А вот мне кажется, что здесь не все так просто. Sequence point перед входом в функцию гарантирует, что side effect инкремента произойдет до входа в функцию. А вот про side effect присваивания известно только, что он произойдет где-то до sequence point в конце full expression. Где гарантия, что это будет после возвращения из функции? Кроме, понятно, здравого смысла.

Вопрос, разумеется, сугубо теоретический.

Date: 2010-06-09 09:58 am (UTC)
From: [identity profile] avva.livejournal.com
Текст стандарта:
When calling a function (whether or not the function is inline), there is a sequence point after the evaluation of all function arguments (if any) which takes place before execution of any expressions or statements in the function body. There is also a sequence point after the copying of a returned value and before the execution of any expressions outside the function).

December 2025

S M T W T F S
  123 4 56
78 9 10 11 1213
1415 1617181920
21 22 23 24 2526 27
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 30th, 2025 11:22 am
Powered by Dreamwidth Studios