問題タブ [ubsan]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - 外部ライブラリからの UndefinedBehaviorSanitizer 警告を抑制
UndefinedBehaviorSanitizer ビルド ( -fsanitize=undefined
) があり、制御できない外部ライブラリで UB の警告を抑制しようとしています。clang/gcc のドキュメントでは について言及__attribute__((no_sanitize("undefined")))
されていますが、驚いたことに、この属性はサブルーチンからの警告を抑制していないようです。
簡単な例:
この属性が機能していないように見えるので、どうすればこの警告を抑制できますか? UBSan ビルドからターゲット全体を削除することもできますが、それは非常に手間がかかるようです。