Mail Archives: djgpp/1994/03/10/19:00:14
> const_11.h:47: warning: file does not end in newline
> Simply inserting a newline at the end of CONST_11.H solved the problem.
> Why does a warning from CPP cause an error-message from CC1?
Probably the source line immediately following #include <const_11.h> gets
appended onto the last line of the include file. The only mystery is why the
warning was not displayed when using gcc.
One can imagine other interesting tricks with include files such as putting
#ifdef in an include file with the matching #endif in the mainline source or
starting and ending a string in different files. A careful reading of the
ANSI spec would probably define how the preprocessor is supposed to behave,
but since nobody in their right mind does things like this, real-world
preprocessors may not be tested for these cases.
- Raw text -