comment style

Henry Spencer henry at zoo.toronto.edu
Sun Jan 13 11:28:06 AEST 1991


In article <1991Jan08.164014.26804 at sco.COM> ron at scocan.sco.COM (Ron Irvine) writes:
>  | ... the characters /* introduce a comment.  The contents of
>  | a comment are examined only to identify multibyte characters
>  | and to find the characters */ that terminate it. 26
>
>Thus, a compiler that gives a warning of nested comments upon
>finding the characters /* within a comment must have "examined"
>the contents of the comment beyond that specified by the standard
>and is in violation of the standard...

Sorry, wrong.  The standard defines the *language*, not the implementation.
What that section says is that the contents of a comment cannot influence
whether a program is legal, and cannot change the semantics of the program's
execution.  Warning messages are outside the scope of the standard entirely.

Indeed, if you examine Appendix E, you will find an explicit suggestion 
that compilers might produce such a warning.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.std.c mailing list