This is the mail archive of the gcc@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]

Re: GCC/EGCS parser bug


> The scope of X is inside the function parameter list.  Thus, when X is used
> the second time, the first use is out of scope, hence no clash.

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?

Martin


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