https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70707
Bug ID: 70707 Summary: INT_MAX used before it is defined Product: gcc Version: 5.3.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dethbomb at hotmail dot com Target Milestone: --- Im a complete newb to linux and gcc so please forgive if this is not the correct way to do things. Or if this is not actually wrong then please ignore. I saw what appeared to me to be incorrect C code while browsing "limits.h". The following 2 cpp lines. # define INT_MIN (-INT_MAX - 1) # define INT_MAX 2147483647 INT_MAX is used before it is defined. The preprocessor seems to accept this in gcc because INT_MAX is defined immediately afterwards.But if a different preprocessor would be used this could cause problems? printf("%i\n",INT_MIN); does give the correct value. But im not sure if its because it may be defined elsewhere in my source code thru some other header file. regards, Lewis