I'm curious about the variable __SIZE_TYPE__
which is predefined by gcc compiler.
Suppose that I coded like following sentence in C
typedef __SIZE_TYPE__ size_t;
Is there any possibility that an error occurs when I use another C compiler excluding gcc?
Do all C compilers have the variable __SIZE_TYPE__
?
Yes, it is possible that an error occurs as soon as you use any identifier with double underscore. See the C standard 7.1.3:
All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
As for __SIZE_TYPE__
that's apparently a gcc identifier. I don't think any other compiler uses it, but there are no guarantees. Another compiler is perfectly free to use the same identifier even for an entirely different purpose.
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