c++cgccconditional-compilation

conditional compilation statement in limits.h


I am not able to understand the following statement from the file limits.h. What is the use of this statement and what does it accomplishes?

/* If we are not using GNU CC we have to define all the symbols ourself.
   Otherwise use gcc's definitions (see below).  */
#if !defined __GNUC__ || __GNUC__ < 2

Solution

  • It checks if your program is compiled by some other compiler than GCC, or some very old GCC version.