This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR 23439/23440
- From: Jeffrey A Law <law at redhat dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Sep 2005 14:56:47 -0600
- Subject: Re: [patch] Fix PR 23439/23440
- References: <tkrat.8ed91272d2867076@igpm.rwth-aachen.de>
- Reply-to: law at redhat dot com
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