Date: Thu, 10 Mar 94 18:32:51 EST From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock) To: pfulmek AT email DOT tuwien DOT ac DOT at Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: invisible CPP-Warning -> CC1-Error ? Reply-To: babcock AT cfa DOT harvard DOT edu > 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 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.