This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] fix some wrong decl slocs
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Mon, 6 Sep 2010 17:57:55 +0200
- Subject: Re: [C++ patch] fix some wrong decl slocs
- References: <20100830131150.GA17694@adacore.com> <20100906092420.GA81415@adacore.com> <4C850E23.1000302@codesourcery.com>
> The idea of this patch is very good. Would you please post the complete
> error output for the test case? I want to see that there is still a
> reference to line three; there really should be references to both lines
> so that the user knows both where the redeclaration occurred and where
> the original declaration occurred.
The complete output is:
$ g++ -c redef2.C
redef2.C:7:5: error: conflicting declaration 'int d'
redef2.C:3:8: error: 'd' has a previous declaration as 'char* d [10]'
Only the column number has changed, nothing else.
> Also, the test case doesn't need to be:
>
> >> +// { dg-do assemble }
>
> Just "// { dg-do compile }". (It's a minor point, but no reason to make
> the testsuite any more expensive than it needs to be.)
OK, I've fixed that. Thanks for the review.
Arno