This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: type0identifiers as identifier


Hello GCC,

GCC compiles the below code snippet without any noise though the
type-identifier "foo" is used as identifier in the function
PrintHello.

My C99 parser failed to parse and I'm wondering if it is a GNU
extension ? Can someone give plausible explanation as  to why it is a
legitimate C program ?

typedef int foo;

static int PrintHello(int val)
{
    int foo;

    printf("Hello world\n");

    return foo;
}

int main()
{
  PrintHell();
}


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