This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70707] INT_MAX used before it is defined
- From: "aleks at physik dot tu-berlin.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Apr 2016 20:24:39 +0000
- Subject: [Bug c/70707] INT_MAX used before it is defined
- Auto-submitted: auto-generated
- References: <bug-70707-4 at http dot gcc dot gnu dot org/bugzilla/>
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