This is the mail archive of the gcc-patches@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: [patch] Fix PR 23439/23440


On Sun, 2005-09-11 at 23:16 +0200, Volker Reichelt wrote:
> The following patch fixes an ice-on-invalid-code of both the C and C++
> frontend for code like this:
> 
>   void foo() { for
> 
> In this case both frontends call annotate_with_file_line with a NULL
> instead of a proper filename. The NULL is passed to strcmp which
> segfaults.
> 
> The patch fixes this by returning early from annotate_with_file_line,
> if no filename is given. A testcase for each frontend is also included.
> 
> Bootstrapped and regtested on i686-pc-linux-gnu.
> OK for mainline and 4.0 branch?
> 
> Regards,
> Volker
> 
> 
> 2005-09-10  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
> 
> 	PR c/23439
> 	PR c++/23440
> 	* tree.c (annotate_with_file_line): Return early on empty filename.
> 	Compare line numbers before filenames.
Weird -- I would have expected to still have a valid FILE argument
in these cases.  Can you explain a little why we do not have a valid
FILE argument?

jeff



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