[LLVMbugs] [Bug 11554] New: basictypes.h: Conflict between int64 and hardcoded long long on GCC 4.6.2 64 bit host build.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 13 07:31:52 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11554

             Bug #: 11554
           Summary: basictypes.h: Conflict between int64 and hardcoded
                    long long on GCC 4.6.2 64 bit host build.
           Product: compiler-rt
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rickfoosusa at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7724
  --> http://llvm.org/bugs/attachment.cgi?id=7724
Patch to fix int64t / long long conflict in sscanf.

Build on Fedora 16 64 bit host fails. Conflict in sscanf between SCNx64 (llx)
and SCNd64 (int64_t). Compiler defines int64_t as long.

Patch for basictypes.h below resolves build problem. Passes unittests. Since
'long long' was hardcoded in int_types.h, I also hardcoded it in basictypes.h.
Since long long should always translate to int64t (when available), seems to
make sense.

-Rick

make[5]: Entering directory `/home/rick/llvm/projects/compiler-rt'
  COMPILE:   clang_linux/asan-x86_64/x86_64:
/home/rick/llvm/projects/compiler-rt/lib/asan/sysinfo/sysinfo.cc
/home/rick/llvm/projects/compiler-rt/lib/asan/sysinfo/sysinfo.cc:324:27: error: 
      conversion specifies type 'unsigned long long *' but the argument has
type
      'uint64 *' (aka 'unsigned long *') [-Werror,-Wformat]
    if (sscanf(stext_, "%"SCNx64"-%"SCNx64" %4s %"SCNx64" %x:%x %"SCNd64" %n",
                        ~~^
/home/rick/llvm/projects/compiler-rt/lib/asan/sysinfo/basictypes.h:82:19: note: 
      expanded from macro 'SCNx64'
#define SCNx64 "llx"
                  ^
/home/rick/llvm/projects/compiler-rt/lib/asan/sysinfo/sysinfo.cc:324:37: error: 
      conversion specifies type 'unsigned long long *' but the argument has
type
      'uint64 *' (aka 'unsigned long *') [-Werror,-Wformat]
    if (sscanf(stext_, "%"SCNx64"-%"SCNx64" %4s %"SCNx64" %x:%x %"SCNd64" %n",
                                  ~~^

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list