[cfe-dev] recent change broke -fcatch-undefined-behavior

Sean McBride sean at rogue-research.com
Fri Nov 16 08:32:26 PST 2012


On Fri, 16 Nov 2012 17:01:53 +0400, Alexey Samsonov said:

>> If you want to test with trunk, you have to apply the 2 attached patched.
>>
>> - clang-ubsan add support to the make toolchain and the driver (Note to
>> Richard: I removed the inclusion of CoreFoundation framework from you
>> previous patch as I think only asan need it and not ubsan).
>> - librt-ubsan fixes a couple of build issue in compiler-rt.
>>
>
>landed these patches in r168167,r168168

I've just tried r168171, and now I can't even build clang:

/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_value.h:27:9: error: unknown type name '__int128'; did you mean '__int128_t'?
typedef __int128 s128;
        ^~~~~~~~
        __int128_t
note: '__int128_t' declared here
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_value.h:28:26: error: expected ';' after top level declarator
typedef unsigned __int128 u128;
                         ^
                         ;
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_value.h:40:9: error: unknown type name 'u128'; did you mean 's128'?
typedef u128 UIntMax;
        ^~~~
        s128
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_value.h:27:18: note: 's128' declared here
typedef __int128 s128;
                 ^
In file included from /Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_diag.cc:14:
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_diag.h:47:5: error: constructor cannot be redeclared
    Arg(SIntMax SInt) : Kind(AK_SInt), SInt(SInt) {}
    ^
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_diag.h:46:5: note: previous declaration is here
    Arg(UIntMax UInt) : Kind(AK_UInt), UInt(UInt) {}
    ^
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_diag.h:47:5: error: redefinition of 'Arg'
    Arg(SIntMax SInt) : Kind(AK_SInt), SInt(SInt) {}
    ^
/Users/sean/llvm/llvm/projects/compiler-rt/lib/ubsan/ubsan_diag.h:46:5: note: previous definition is here
    Arg(UIntMax UInt) : Kind(AK_UInt), UInt(UInt) {}
    ^






More information about the cfe-dev mailing list