This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: type0identifiers as identifier
- From: vijay nag <vijunag at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 18 Mar 2016 21:54:20 +0530
- Subject: Re: type0identifiers as identifier
- Authentication-results: sourceware.org; auth=none
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();
}