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
Extent of the "as-if" rule
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dan Pop, post: 1698339"] No, your stdin, stdout and stdout must be open, but any attempt to get input from the first one or send output to the last two ones may fail. Of course, no fopen() call need succeed. With this implementation, no C program can produce any output and you can optimise each correct C program to the equivalent of: int main() { while(1); } because the standard doesn't specify how long it takes to a program to complete its execution. Your translator will only have to implement translation phases 1 to 4 (only to the extent necessary for properly handling any active #error directive), after that you can display "hello world" (just in case the program needed a diagnostic during translation phase 7) and then generate the code for the optimised version shown above. Dan [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Extent of the "as-if" rule
Top