This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] [PR13927] Dump alias_decl and fix duplicated error message (regression 3.4/mainline)
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Giovanni Bajo" <giovannibajo at libero dot it>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: 02 Feb 2004 22:17:59 +0100
- Subject: Re: [C++ PATCH] [PR13927] Dump alias_decl and fix duplicated error message (regression 3.4/mainline)
- Organization: Integrable Solutions
- References: <1f6701c3e9cd$22b4d630$b3bc2997@bagio>
"Giovanni Bajo" <email@example.com> writes:
| this patch makes error.c handle ALIAS_DECL just any other simple
| declartion, thus fixing the diagnostic messages. It also removes a
| duplicated error message in case of redefinition of a symbol of
| different kind: in fact supplement_binding has the correct logic to
| handle this case, while duplicate_decls was trying to be smart and
| doing the work itself.
| Notice that the position at which the previous declaration is
| reported is wrong (since it's at the end of the union). This is a
| different bug, I've xfailed it.
| Tested on i686-pc-linux-gnu with no new regressions, OK for mainline
| and 3.4?
The cp/error.c change is OK, but I don't agree with the change for
The comment at the front of supplement_binding is that it is the
caller's responsability to make sure that supplementing the binding is
OK. In particular, supplement_binding should be not involed in any
direct diagnostic business. I tried to fix that a while ago but
apparently I didn't get that chunk out.
Maybe, it is that it might make an easier code-path to follow to let
supplement_binding issue diagnostics but in that case, you need to
revisit duplicate_decls because there are many cases where
supplement_binding thinks the right things are done elsewhere.
(And, anyway, duplicate_decls is such a labyrinth that I'm very
cautious about any changes made to it :-)