> E.g. how many people don't see 3 things in
> the following program that make it non-ISO?
>
> // Print hello world!
>
> void main(int argc, char **argv, char **envp)
> {
> printf("hello world\n");
> }
PE>
JdBP> Three ? I see at least five.
JdBP> ( Wrong return type for `main', POSIX 1003 extension for environment
JdBP> pointer, lack of a return statement in `main', lack of inclusion of
JdBP> the header, and use of C++ comments in a C program. )
Whoops! I can't remember whether I left out stdio to create an
extra error, and forgot to add that to the error count, or whether
I left out the stdio accidentally. Probably the latter. However,
you can't claim the "void" and "lack of return" both, only one or
the other, so that makes 4 errors.
JdBP> On the other hand, there are certain parts of the Borland Standard C
JdBP> Library implementation where you can see that badly written code has
JdBP> introduced non-conformances.
Would you like to list some of the non-conformances you know of?
BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|