This is the mail archive of the gcc@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]

Possible bug with crosscompiling: overflow in implicit constantconversion?



I've build successfully a crosscompiler with current CVS from ix86
(32-bit) to x86-64 (64 bit).  Crosscompiling glibc gave a large number
of warnings that I don't understand.

The problem can be reduced to this:

$ /opt/x86-64/bin/gcc t.c
t.c: In function `main':
t.c:6: warning: overflow in implicit constant conversion

The program is:
int
main (void)
{

  int a = 0;
  char c = '\xff';
  
  return 0;
}

If I use a signed char, I get:
$ /opt/x86-64/bin/gcc t.c
t.c: In function `main':
t.c:6: warning: large integer implicitly truncated to unsigned type

Has anybody an idea what's wrong?

Thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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