avr-gcc:是否有 UB 消毒剂

avr-gcc: is there an UB sanitizer

尝试将 UB 消毒剂用于 AVR 目标会产生:

avr-gcc -Wall  -mmcu=attiny1614 -fsanitize=undefined  bm02.c 
/usr/local/lib/gcc/avr/10.0.0/../../../../avr/bin/ld: cannot find
-lubsan collect2: error: ld returned 1 exit status

可以构建支持 UBsan 的 avr-gcc 吗?

没有

目前,avr-g++ 没有完整的 C++ 支持,对于此类目标,顶层 configure.ac switches off libsanitizer. This is because libsanitizer is written in C++, cf. ubsan sources