#110 Unimplemented: Cannot represent integer 0xff00000000000000UL

Bug
closed-fixed
nobody
5
2010-05-21
2009-07-01
Anonymous
No

CIL reports errors for pciehp_core.o.i while gcc successfully compiles it
Do you have a workaround for it?

~/linux-test/linux-2.6.29/drivers/pci/hotplug$ ~/tools/cil-1.3.7/bin/cilly pciehp_core.o.i
cil-1.3.7/obj/x86_LINUX/cilly.asm.exe --out /tmp/cil-XUTQTLcP.cil.c pciehp_core.o.i
include/linux/swab.h:179: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

include/linux/byteorder/generic.h:170: Unimplemented: Cannot represent integer 0xff00000000000000ULL in 64 bits (signed)

Error: Cabs2cil had some errors
Fatal error: exception Errormsg.Error

Discussion

  • preprocessed file from linux 2.6.29

     
    Attachments
  • I get the same type of error message with the following code:

    int main(int argc, char **argv) {

    unsigned long long int big_long;

    big_long = 18446744073709551615ULL;

    return 1;

    }

    The exact error message is:

    max_long.c:5: Unimplemented: Cannot represent integer 18446744073709551615ULL in 64 bits (signed)

    Error: Cabs2cil had some errors
    Fatal error: exception Errormsg.Error
    make: *** [max_long.cil.c] Error 2

    I looked into Cil.ml but unfortunately I don't know Cil well enough to propose a patch. Any help will be greatly appreciated.

     
  • Ben Liblit
    Ben Liblit
    2009-11-13

    The constant "0xffffffffffffffffULL" (representing the largest possible 64-bit unsigned value) also triggers this bug, and is found in various standard header files including <glib-2.0/glib/gtypes.h> from the GNOME libraries.

     
    • status: open --> closed-fixed
     
  • This is fixed in the svn (as was already fixed when the bug was submitted, by the way).