This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70707] INT_MAX used before it is defined


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70707

Alexander Kleinsorge <aleks at physik dot tu-berlin.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aleks at physik dot tu-berlin.de

--- Comment #2 from Alexander Kleinsorge <aleks at physik dot tu-berlin.de> ---
Problem confirmed with: gcc (GCC) 5.3.0
Usage before definition is no header problem (as suggested by Lewis).

// TestCode, no includes
#  define INT_MIN       (-INT_MAX - 1)
#  define INT_MAX       2147483647
int test1(int b) {
    return (b + INT_MIN);
}
int main(int argc, char** argv) {
    return test1( argc );
}
// EndOfFile

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]