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++/42265] New: LONG_MAX is 9223372036854775807 rather than 2147483647 on macintosh 10.6


Hi, It appears that on macintosh 10.6 LONG_MAX has the same value as LLONG_MAX.
Below is a program that demonstrates the problem

$ cat long_max.cpp
#include <iostream>

int main()
{
        std::cout << "LONG_MAX="<<LONG_MAX<<"\n";
        std::cout << "LLONG_MAX="<<LLONG_MAX<<"\n";
}

$ ./a.out
LONG_MAX=9223372036854775807
LLONG_MAX=9223372036854775807


$ g++ --version
i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)

$ uname -a
Darwin 156-56-92-239.dhcp-bl.indiana.edu 10.2.0 Darwin Kernel Version 10.2.0:
Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386

Thanks!


-- 
           Summary: LONG_MAX is 9223372036854775807 rather than 2147483647
                    on macintosh 10.6
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: csights at fastmail dot fm
  GCC host triplet: i686-apple-darwin10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42265


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