Add -Wtsan.
authorMartin Liska <mliska@suse.cz>
Mon, 7 Dec 2020 14:55:59 +0000 (15:55 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 16 Dec 2020 09:25:32 +0000 (10:25 +0100)
commit8833eab4461b4b7050f06a231c3311cc1fa87523
tree311bae63eda19649eb32f3383b3408d1e7891598
parent5c5eb7e4872025e8d5e8ae2f0e568403f7c8803d
Add -Wtsan.

gcc/ChangeLog:

PR sanitizer/97868
* common.opt: Add new warning -Wtsan.
* doc/invoke.texi: Likewise.
* tsan.c (instrument_builtin_call): Warn users about unsupported
std::atomic_thread_fence.

gcc/testsuite/ChangeLog:

PR sanitizer/97868
* gcc.dg/tsan/atomic-fence.c: New test.
gcc/common.opt
gcc/doc/invoke.texi
gcc/testsuite/gcc.dg/tsan/atomic-fence.c [new file with mode: 0644]
gcc/tsan.c