This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is a Better Warning for this Stupid Mistake?


Joel Sherrill wrote:
Hi,

I made a stupid typo and accidentally included
an unprotected file from itself.  The error
message generated by gcc surprised me and I
wondered if there was a better alternative.

Seems like a perfectly fine message to me, what do you suggest in its place (remember that recursive includes are allowed, they are not illegal).

$ cat recursive_include.c
#include "recursive_include.c"
$ gcc -c recursive_include.c ................
from recursive_include.c:1:
recursive_include.c:1:31: error: #include nested too deeply
$ gcc -c recursive_include.c 2>&1 | wc -l
200


Thanks.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]