typedef long a;
extern a int c;
Hi the above code gives errors like In function 'main':
Line 7: error: two or more data types in declaration specifiers
but when the same 'a' in 2nd line is replaced by long it works perfectly fine. This works perfectly fine
typedef long a;
extern long int c;
Please explain why does this happen
long int is a type name.
type-alias-name type-name is parsed as two types even if type-alias-name is an alias for long and type-name is int.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With