This is warning:-text-following-#endif-violates-ANSI-standard in view mode; [Up]
Date: Sun 18-Sep-1991 00:55:25 From: rnielsen@everest.com (Robert D. Nielsen) Subject: warning: text following #endif violates ANSI standard I compile my C sources with the following compiler options cc -c -v -Wall -ansi -pedantic foobar.c and I have historically received these messages /usr/include/stdlib.h:72: warning: text following #endif violates ANSI standard /usr/include/stdio.h:32: warning: text following #endif violates ANSI standard /usr/include/c.h:39: warning: text following #endif violates ANSI standard /usr/include/c.h:42: warning: text following #endif violates ANSI standard /usr/include/c.h:48: warning: text following #endif violates ANSI standard /usr/include/c.h:55: warning: text following #endif violates ANSI standard [list not complete] I was able to fix all (but one) by simple inserting "// " before the text the compiler was complaining about. This, however, did not work with stdio.h. They appear to be identical in terms of the trailing text, but obviously are not. Has anyone solved this problem?
Date: Sun 18-Sep-1991 15:42:30 From: nerd@percival.rain.com (Michael Galassi) Subject: Re: warning: text following #endif violates ANSI standard rnielsen@everest.com (Robert D. Nielsen) writes: >I compile my C sources with the following compiler options >cc -c -v -Wall -ansi -pedantic foobar.c ... >/usr/include/c.h:42: warning: text following #endif violates ANSI standard ... >I was able to fix all (but one) by simple inserting "// " before the text the >compiler was complaining about. This, however, did not work with stdio.h. >They appear to be identical in terms of the trailing text, but obviously are >not. Has anyone solved this problem? If you realy want to satisfy an ANSI C compiler, don't insert "//" before the text folowing the #endif or #else, wrap that text up in "/*" and "*/" instead. The other alternative is to not use -pedantic, 'tis not worth much anyway.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.