This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC/EGCS parser bug
- To: amylaar at cygnus dot co dot uk
- Subject: Re: GCC/EGCS parser bug
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 16 Feb 1999 23:05:44 +0100
- CC: amylaar at cygnus dot co dot uk, zack at rabi dot columbia dot edu, Joachim dot Hollman at front dot se, egcs at egcs dot cygnus dot com
- References: <199902162053.UAA07300@phal.cygnus.co.uk>
> > This is what I thought. Then what about the original example?
> >
> > typedef void (*func)(int);
> > void f(int i1, void (*func)(void *, void *), int i2);
> >
> > Shouldn't the prototype of f open a new scope, shadowing the previous
> > (global) definition of func? Shouldn't that happen regardless of whether
> > the previous definition was a typedef or an object?
>
> No, because a typedef changes the type of lexical token of the affected
> symbol.
I'm lost. Why doesn't it 'change the type of lexical token' in
typedef void (*func)(int);
void f()
{
void (*func)(void*,void*);
func(0,0);
}
And I thought I understood C...
Martin