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: PR 27078: fixes duplicate ambiguous reference error messages


On 01/06/07, Ollie Wild <aaw@google.com> wrote:
This patch fixes several redundant "ambiguous reference" error
messages by checking ambiguous_decls after calls to
cp_parser_lookup_name.  It also removes the ambiguous_p flag from
struct cp_token.  It was not being used consistently, and its
functionality should be handled by tentative parsing anyways.


You need a testcase that failed before the patch and passes after the patch. Something like this may work. If you can think of any other testcases, please include them. The more, the better.

// { dg-do compile }
// { dg-options "" }
enum E1 { V };
namespace { enum E2 { V }; }
int foo() { return static_cast<int>(V); } // { dg-bogus "error:
reference to .V. is ambiguous.*error: reference to .V. is ambiguous" }
// { dg-error "error: reference to .V. is ambiguous" "" { target *-*-*} 5 }


Please, check that the testcase actually fails with mainline and passes with your patch applied.

Cheers,

Manuel


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