Hi,

The problem here is that the typedef overrides the previous type. To
avoid that, we have to check that the new DECL is not a type.
Some code uses supplement_binding to 'refine' the binding, so if the
new DECL is a type and is of the same type than the old binding, then
supplement_binding succeeds.

Bootstrapped, regtested on x86_64-unknown-linux-gnu.
OK for trunk ?

gcc/cp/ChangeLog

2010-11-15  Fabien Chêne  <fab...@gcc.gnu.org>

        PR c++/48010
        * name-lookup.c (supplement_binding_1): If the old binding was a
        type name, also check that the DECL actually refers to the same
        type or is not a type.

gcc/testsuite/ChangeLog

2010-11-15  Fabien Chêne  <fab...@gcc.gnu.org>

        PR c++/48010
        * g++.dg/lookup/name-clash9.C: New.

-- 
Fabien

Attachment: pr48010.patch
Description: Binary data

Reply via email to