Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
program output?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Eric Sosman, post: 1711878"] "Upon further review," as they say in Murkin football, I think you may be right. 3.4.1 tells us that implementation- defined behavior is a subset of unspecified behavior, and 3.4.4 says the latter involves a choice from among two or more possibilities described in the Standard. 7.19.2/2 says it's implementation-defined whether the final line does or does not require a terminating newline, and 3.4.1 says the implementation must document its choice. Nothing says what happens if the implementation chooses "The newline is required" and the program tries to violate the requirement, so the behavior thereafter is undefined because the Standard imposes no requirement (3.4.3). ... which leads to an interesting clash between Standardese and ordinary English. If the implementation goes on to describe what happens if the program omits the required newline ("A newline is synthesized from thin blue air," say), this implementation- provided definition does not "define" the behavior! We're still in 3.4.3 territory because the implementation's definition doesn't meet the requirements of 3.4.4 by making a choice among Standard- specified behaviors. The behavior is defined by the implementation, but is not implementation-defined. Counter-intuitive, but eventually understandable. "After great pain a formal feeling comes." [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
program output?
Top