This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c/7622
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Philippe Trebuchet <Philippe dot Trebuchet at sophia dot inria dot fr>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>,gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Dec 2002 23:08:00 +0100
- Subject: Re: [PATCH] Fix PR c/7622
- References: <md5:08339ACA394ECEF8E03F09664946F2A7> <m3hedtsukj.fsf@uniton.integrable-solutions.net> <3DEE2F04.20EBDF31@sophia.inria.fr>
> I think it cannot be flagged by that time because it is just a forward
> nested declare
You're right. I didn't know that forward nested declarations were allowed
in GNU C. What a weird language! :-)
> I beleive that genrtl_scope_stmt is the right time to
> check everything is in place. I do not clearly see when the lack of a
> definition of a auto nested function can be checked before, I am
> realatively new to gcc internals so
> it may be wrong, in that case I would appreciate if you spotted me out
> where we could do such a test.
See c-decl.c:poplevel().
> In fact I was just spotting the fact that the patch could hide some
> unwanted behaviour.
Yes, I see your point. I agree that we might want to close the hole exhibited
by your testcase. FYI, gcc 3.3 now behaves the same as gcc 2.95.3 wrt this
problem.
> I understand this point, but as there is no mangement of asm symbols it
> is quite hard perform any check, I am trying to understand asm symbols
> emission and see if I can build something like this. we can just forbid
> the use of alias in nested scope because for the time being.
According to what Richard said, the first part is not straightforward at all.
The second part is probably not as hard as the previous one.
--
Eric Botcazou