Why GNU configure defines macros for SIZEOF_INT, etc. How are specific integer values?

If you are going to define them at all, why not define them as

#define SIZEOF_INT sizeof(int)

etc .. why are they correct even if someone is trying to use them to compile with a different architecture?

+6
source share
1 answer

I found the answer a minute after the question. These macros are sometimes used in predicates of #if, etc., where it is impossible to determine the size of calls.

for example

#if SIZEOF_LONG_LONG_INT == 8
stuff
#endif
+8
source

Source: https://habr.com/ru/post/1017328/


All Articles