J
James Brown
I can't find this covered in the FAQ:
typedef int foo;
typedef struct foo
{
int a, b, c;
} bar;
int main()
{
struct foo f1;
foo f2;
return 0;
}
it compiles with just a warning about unused variables f1, f2
but this seems ambiguous to me. What type is "foo" - is it
an "int", or a "struct" ?
how should a compiler treat this type "foo"??
thanks,
James
typedef int foo;
typedef struct foo
{
int a, b, c;
} bar;
int main()
{
struct foo f1;
foo f2;
return 0;
}
it compiles with just a warning about unused variables f1, f2
but this seems ambiguous to me. What type is "foo" - is it
an "int", or a "struct" ?
how should a compiler treat this type "foo"??
thanks,
James