H
Henri Manson
Today I discovered that the following code fragment compiles under gcc 3.0
(even with the -ansi option) and doesn't compile under gcc 2.95. As far as I
know it's not allowed in C to declare variables in a block after the first C
statement.
#include <stdio.h>
main()
{
int x;
printf("Hello world\n");
int y;
return 0;
}
But propably the C standard has changed. Can somebody tell me something
about that change?
(even with the -ansi option) and doesn't compile under gcc 2.95. As far as I
know it's not allowed in C to declare variables in a block after the first C
statement.
#include <stdio.h>
main()
{
int x;
printf("Hello world\n");
int y;
return 0;
}
But propably the C standard has changed. Can somebody tell me something
about that change?