[Bug pch/9391] when trying to compile header files, gcc emits an error, then compiles everything, and only then bails out

stefaandr at hotmail dot com gcc-bugzilla@gcc.gnu.org
Fri Aug 1 11:30:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9391



------- Additional Comments From stefaandr at hotmail dot com  2003-08-01 11:30 -------
Subject: Re:  when trying to compile header files, gcc emits
 an error, then compiles everything, and only then bails out

Sorry, missed the previous mail.  
> State-Changed-Why: You didn't give us the content of the header file 
> that creating the problem for you.
My report may have been a little cryptic: "> t.h" meant I created an empty 
.h-file.  I must admit it would have been clearer also to add invalid 
content to t2.cpp.  
I am now using gcc 3.3.  I have an empty t.h, and t2.cpp contains:
"int main() { bla };"

Trying to compile "gcc -o test t.h t2.cpp" shows that it first comes to 
the constatation that t.h is a header file and thus compilation should 
fail, but still then tries to compile t2.cpp, and fails afterwards.  
It doesn't make a lot of difference in this small example, but when you 
have a very large t2.cpp with a couple of more errors, compilation will 
take a long time before the inevitable failure, and a lot of 
compilation error messages will appear obfuscating the real origin of the 
failure.

This might not even be considered as a bug by the gcc developers, but I 
thought I would at least mention it, it's something I personally would 
change.

Stefaan

On 31 Jul 2003, pinskia at physics dot uc dot edu wrote:

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9391
> 
> 
> pinskia at physics dot uc dot edu changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|WAITING                     |RESOLVED
>          Resolution|                            |INVALID
> 
> 
> ------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-31 18:28 -------
> No feedback in 3 months (really one day left).
> PCH has been improved from January, it is now used for the libstdc++ testsuite.
> 
> 
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>



More information about the Gcc-bugs mailing list