To: DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU Subject: invisible CPP-Warning -> CC1-Error ? From: pfulmek AT email DOT tuwien DOT ac DOT at (Paul FULMEK) Reply-To: pfulmek AT email DOT tuwien DOT ac DOT at Date: Thu, 10 Mar 1994 18:09:57 +0000 I had some problems with a nasty little invisible warning that resulted in an error. When I tried to compile a little program the following output was produced: gcc -m486 -ansi -pedantic -v -Wall -g -c my.c -o my.o Reading specs from D:/GNU.111/lib/specs gcc version 2.5.7 D:/GNU.111/bin/cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=5 -trigraphs -$ -D__STRICT_ANSI__ -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__unix -D__i386 -D__GO32 -D__MSDOS -g -Wall -pedantic my.c D:/TEMP/cc000105 GNU CPP version 2.5.7 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: d:/gnu.111/include d:/gnu.111/contrib/libgrx/include /usr/local/include /usr/local/go32/include /usr/local/lib/gcc-lib/go32/2.5.7/include /usr/include End of search list. D:/GNU.111/bin/cc1.exe D:/TEMP/cc000105 -fno-builtin -quiet -dumpbase my.c -m486 -g -Wall -pedantic -ansi -version -o D:/TEMP/cca00105 GNU C version 2.5.7 (80386, BSD syntax) compiled by GNU C version 2.5.7. D:/TEMP/cc000105:1: parse error before `file' GCC.EXE deleted the temporary files so i couldn't find out why and where the error has occured. When i invoked CPP.EXE and CC1.EXE (with the commandlines from above) myself, the output of CPP revealed the following WARNING: D:/TEMP/ccout: >In file included from my.c:3: >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? Why doesn't GCC tell me anything about this warning ( -v -Wall )? Can I suppress the automatic deletion of the temporary files in the case of an error? - This would have helped a lot to localize the source of the error-message. Paul -- Technische Universitaet Wien Institut fuer Werkstoffe der Elektrotechnik Dipl.-Ing. Paul FULMEK Tel. (+43 222) 58801/3955 FAX: (+43 222) 50 41 587 Gusshausstrasse 27-29 Austria - 1040 WIEN