Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Clearly, you have never read the C spec.


No I did not. But in the end, when it gets compiled, every word is clearly defined, or not?


>C11(ISO/IEC 9899:201x) ยง3.4.3

>1 undefined behavior

>behavior, upon use of a non portable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements

>2 NOTE Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).

>3 EXAMPLE An example of undefined behavior is the behavior on integer overflow.


"EXAMPLE An example of undefined behavior is the behavior on integer overflow."

Yeah, that is obvious, but is there a example, where a defined variable is not clear defined and ambigious?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: