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]

large integer implicitly truncated to unsigned type


CVS gcc October 22, 2000 gives lots of

  warning: large integer implicitly truncated to unsigned type

messages for constructs like this.

  #define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )

Changing to

  #define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & (unsigned)~(sizeof(long)-1) )

removes the warning.  Is this warning message correct and is it going
to be a permanent feature of gcc?  If so I will do a kernel patch to
make (unsigned) explicit.


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