This is the mail archive of the
mailing list for the GCC project.
Re: C++ Patch for c++/60894
- From: Jason Merrill <jason at redhat dot com>
- To: Fabien Chêne <fabien dot chene at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 09 Oct 2014 09:34:46 -0400
- Subject: Re: C++ Patch for c++/60894
- Authentication-results: sourceware.org; auth=none
- References: <CAFH4-dhoAY5VwHKrBWF_yt_xaAi57nZe-_XytaNxSEjxX1xC0w at mail dot gmail dot com> <54233484 dot 8050801 at redhat dot com> <5434576D dot 6080004 at redhat dot com> <CAFH4-dhYzdoDG4bcRP92tA1zimO6D1bYVRZaE_HnesVf_bTMcw at mail dot gmail dot com>
On 10/08/2014 01:30 PM, Fabien Chêne wrote:
2014-10-07 23:13 GMT+02:00 Jason Merrill <firstname.lastname@example.org>:
It seems to me that the problem is that lookup_and_check_tag is rejecting a
USING_DECL rather than returning it. What if we return the USING_DECL?
If the USING_DECL is returned, the code below will be rejected as
expected, but the error message will not mention the line where the
USING_DECL appears as the previous definition, but at the target
declaration of the USING_DECL instead.
I think that's what happens if you strip the USING_DECL and return what
it points to; if you return the USING_DECL itself that shouldn't happen
(though then the caller needs to be able to deal with getting a USING_DECL).