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
Does your C compiler support "//"? (was Re: using structures)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Keith Thompson, post: 1676775"] My point is that implementers can safely ignore the concept of strict conformance. They don't have to write any strictly conforming code themselves; a compiler or runtime library doesn't even have to be written in C, let alone strictly conforming C. They have to create an implementation that will accept all strictly conforming programs, but by any reasonable or unreasonable interpretation of the definition of "strictly conforming", they have to do that anyway to have a viable implementation. Consider three sample programs: /* 1 */ int main(void) { return 0; } /* 2 */ #include <stdio.h> int main(void) { printf("Hello, world\n"); return 0; } /* 3 */ #include <stdio.h> int main(void) { const char *s = "Hello, world\n"; printf("The string literal is stored at address %p\n", (void*)s); return 0; } We can all agree, I think, that the first program is strictly conforming and the third is not, since it produces output dependent on unspecified and/or implementation-defined behavior. I doubt that any implementer worries about the distinction. Any successful implementation has to handle all three of these programs in a reasonable manner, because the failure to do so will be considered a serious bug by users. As far as I can tell, real-world programmers tend to ignore the entire issue, regardless of what arguments are made about it. And by the way, I think you're mistaken in your assumption that anyone arguing this point is an opponent of the C standard. What I see in this discussion is serious concern over the way the standard is written, and an honest desire for it to say what it means. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Does your C compiler support "//"? (was Re: using structures)
Top