Y
ymuntyan
Hey,
Is the following code valid:
typedef int A;
void func (void)
{
A A;
}
It looks right to me, the second "A" is a type name from
the outer scope when it's seen, so it's not hidden by the
third "A", and so that's a declaration
outer-type-A in-func-variable-A;
What makes me doubt about it is that all yacc-like
parsers I looked at will parse that line inside func() as
outer-type-A outer-type-A
Is the following code valid:
typedef int A;
void func (void)
{
A A;
}
It looks right to me, the second "A" is a type name from
the outer scope when it's seen, so it's not hidden by the
third "A", and so that's a declaration
outer-type-A in-func-variable-A;
What makes me doubt about it is that all yacc-like
parsers I looked at will parse that line inside func() as
outer-type-A outer-type-A