[cfe-users] -Wunreachable-code warnings can no longer be suppressed?

2016-08-05 Thread Chris Peterson via cfe-users
I suppressed a -Wunreachable-code warning in Firefox earlier this year 
[1] by adding extra parentheses, as suggested by Xcode's clang on OS X:


objdir-osx/dom/bindings/TestJSImplGenBinding.cpp:47639:20: note: silence 
by adding parentheses to mark code as explicitly dead

   if (false && !CallerSubsumes(temp)) {
^
/* DISABLES CODE */ ()

This is generated C++ code in Firefox, so changing the code generator to 
emit the extra parentheses was easier than complicating the code 
generator's logic for this particular case.


Unfortunately, this Firefox warning is back [2] because clang 3.9 on 
Linux no longer recognizes the parentheses suppression. Is this an 
intentional change to -Wunreachable-code or a regression? I don't see 
the warning string "silence by adding parentheses to mark code as 
explicitly dead" in the clang code on GitHub [3], but I see a few clang 
tests that appear to expect that warning string.


thanks,
chris

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1223265
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1291397
[3] https://github.com/llvm-mirror/clang
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] /usr/bin/ld: cannot find libclang_rt.ubsan_standalone-arm.a: No such file or directory

2016-08-05 Thread Jeffrey Walton via cfe-users
I'm working on Raspberry Pi 3. Its an ARMv8 device with CRC but
without Crypto extensions. It also uses a 32-bit OS and hard float
configuration.

I'm trying to track down a crash that happens under both GCC and Clang
on this platform. Other ARM platforms are OK, and i686 and x86_64 are
OK.

I compiled the program with the following CXXFLAGS.

-march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8
-mfloat-abi=hard -fsanitize=undefined

The compiler driver invokes the linker, and it includes the CXXFLAGS.
The link results in:

$ make
clang++  -pthread -march=armv8-a -mtune=cortex-a53 -mfpu=neon-fp-armv8
-mfloat-abi=hard -fsanitize=undefined -Wl,-rpath=\$ORIGIN
build/obj/cli/x509.o build/obj/cli/compress.o build/obj/cli/pubkey.o
build/obj/cli/tls_proxy.o build/obj/cli/utils.o build/obj/cli/cc_enc.o
build/obj/cli/asn1.o build/obj/cli/math.o build/obj/cli/speed.o
build/obj/cli/tls_server.o build/obj/cli/main.o
build/obj/cli/tls_client.o -L. -lbotan-1.11 -lrt -o ./botan
/usr/bin/ld: cannot find
/usr/lib/llvm-3.7/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.ubsan_standalone-arm.a:
No such file or directory
/usr/bin/ld: cannot find
/usr/lib/llvm-3.7/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.ubsan_standalone_cxx-arm.a:
No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1521: recipe for target 'botan' failed

Grepping is not finding the missing library:

$ sudo find / -name '*ubsan*'
/usr/lib/arm-linux-gnueabihf/libubsan.so.0.0.0
/usr/lib/arm-linux-gnueabihf/libubsan.so.0
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libubsan.so
/usr/lib/gcc/arm-linux-gnueabihf/4.9/libubsan.a
/usr/share/doc/libubsan0
/var/lib/dpkg/info/libubsan0:armhf.postrm
/var/lib/dpkg/info/libubsan0:armhf.md5sums
/var/lib/dpkg/info/libubsan0:armhf.postinst
/var/lib/dpkg/info/libubsan0:armhf.symbols
/var/lib/dpkg/info/libubsan0:armhf.list
/var/lib/dpkg/info/libubsan0:armhf.shlibs

And:

$ sudo dpkg -S libclang_rt.ubsan_standalone_cxx-arm.a
dpkg-query: no path found matching pattern
*libclang_rt.ubsan_standalone_cxx-arm.a*

It appears at least some of the saniziters are available on some of
the compilers.

My questions are:

  * Does Clang support UBsan on ARM?
  * If so, what package normally supplies it?

Thanks in advance.
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users