where can I find the declaration of __TYPE_SIZE__ and __cplusplus?
Hello everyone
When I try to find the definition of size_t, I find this line in stddef.h (with Eclipse): typedef __SIZE_TYPE__ size_t; This confuses me, and I decide to find the decalaration of __SIZE_TYPE__ , I click on "Open Declaration" but find nothing. However, when I expand macro it shows: #define __SIZE_TYPE__ unsigned int I searched the whole foldes which contains head files, but I couldn't find that file containing that line. I open the Explore Macro Expansion window and trace its expansion, find there is only one step. Again, I click on the 'Open Declaration' button which can find macro defined by me, but nothing found. So, what happend? Where this expansion (#define __SIZE_TYPE__ unsigned int) from? I searched the Internet, but found nothing. There is a similar specifier I can't find: __cplusplus. I am confused now. Please help! Thanks! |
They aren't defined in any header files - they're predefined by the compiler to give code the information about the system it's being compiled for.
To get the exhaustive list of all such predefined macros, run this command-line (this also works with g++): Code:
gcc -dM -E - < /dev/null |
Thank you very much!
Esp. the way to find out all the pre-definition is very useful!! |
Thank you very much!
Esp. the way to find out all the pre-definition is very useful!! |
All times are GMT -5. The time now is 12:52 PM. |