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]

gcc-2.95.2: size of a long with -mcpu=ultrasparc on Solaris 2.6


The use of the -mcpu=ultrasparc option affects the size of LONG_MAX.
My machine certainly is an ultrasparc, but it's not running a 64-bit
operating system.  I think this used to work correctly on older
versions of egcs.

Shell transcript follows (nice short test case):

$ cat long-max.c
#include <limits.h>
int foo = LONG_MAX;
$ /usr/local/src/gcc-2.95.2/inst/solaris/bin/gcc -c long-max.c
$ /usr/local/src/gcc-2.95.2/inst/solaris/bin/gcc -mcpu=ultrasparc -c long-max.c
long-max.c:2: warning: overflow in implicit constant conversion
$ /usr/local/src/gcc-2.95.2/inst/solaris/bin/gcc -E long-max.c | tail -1
int foo = 2147483647L  ;
$ /usr/local/src/gcc-2.95.2/inst/solaris/bin/gcc -mcpu=ultrasparc -E long-max.c | tail -1
int foo = 9223372036854775807L  ;
$ uname -a
SunOS polgar.666.com 5.6 Generic sun4u sparc SUNW,Ultra-30


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