RE: gcc not warning on all occurences of operations with undefine d results?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I think, that this is wrong. The exact rule should be more like "...if 
> the result of the operation is not defined by standard..."

The exact rule is in section 5.1.2.3 Paragraph 2

"Evaluation of an expression may produce side effects. At certain specified
points in the execution sequence called sequence points, all side effects of
previous evaluations shall be complete and no side effects of subsequent
evaluations shall have taken place."

Since there are no sequence points for the assignment, increment or index
operators, the behaviour is undefined.

Regards,

Ryan Mansfield

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux