1

Undefined, unspecified and implementation defined behavior are fundamental concepts in writing safe and portable code in programming language C. Unfortunately, the only accurate and comprehensive source where to find information about these concepts is in the standards that define the language, all of them only accessible upon payment of a generous amount (there is a draft of C99 publicly accessible, but anything about ANSI C/C90, nor C11).

Is there any publicly accessible, accurate and comprehensive list of C undefined, unspecified and implementation defined behavior?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user3368561
  • 779
  • 6
  • 18
  • 7
    [Publicly available C11 pre-publication draft](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf). – John Bode Oct 12 '16 at 14:13
  • For low price, take a look at [this SO post](http://stackoverflow.com/questions/38740708/c11-standard-docs) – LPs Oct 12 '16 at 14:16
  • @JohnBode Can you ensure that there are no significant differences between the draft and the official version? At least concerning this subject. – user3368561 Oct 12 '16 at 14:20
  • 4
    One who is *really* concerned about the differences, should go and buy the official release. – Eugene Sh. Oct 12 '16 at 14:22
  • @EugeneSh. This answer is right for a company, but not every particular can afford to buy all C standards (I'm asking for all of them, not only one). Answers to this question must be useful to other people besides me. – user3368561 Oct 12 '16 at 14:27
  • 5
    Annex J Portability Issues of the standard is 'Informative' (not 'Normative') and has 5 sections: J.1. Unspecified behaviour; J.2 Undefined behaviour; J.3 Implementation-defined behaviour; J.4 Locale-specific behaviour; J.5 Common extensions. That's what you need. What's in the drafts won't be significantly different from what's in the standard. If you're concerned about differences, you have to buy the standard. – Jonathan Leffler Oct 12 '16 at 14:31
  • 2
    @user3368561 The standards cost money because they make money from people who really need an answer to the question "Can you ensure that there are no significant differences between the draft and the official version?". As far as anyone knows, the last draft is exactly the same as the standard document. Want a better answer that doesn't contain "as far as anyone knows"? Pay them. – Art Oct 12 '16 at 14:36
  • ISO/IEC 9899:2011 does not get you any farther than N1570 in terms good programming practices. If you really care about code quality, try some coding standards guidelines like "MISRA C" and "SEI CERT C". – user3528438 Oct 12 '16 at 14:53

0 Answers0