[Bug sanitizer/109882] -fsanitize=thread #include transitively includes sanitizer/common_interface_defs.h

2023-05-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-05-16
 Ever confirmed|0   |1

--- Comment #4 from Jonathan Wakely  ---
The header is included since r13-2677-g0abc63a5ea4550 (and
r12-9342-g0cec4e9cd44e25 on the branch), and not including it would mean not
being able to annotate atomic>.

I agree with Andrew, this is a bug in libsanitizer. The correct way to use
__has_feature in a public header is to test with #ifdef __has_feature not to
define the fallback definition.

[Bug sanitizer/109882] -fsanitize=thread #include transitively includes sanitizer/common_interface_defs.h

2023-05-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882

--- Comment #3 from Andrew Pinski  ---
Then you should file this bug upstream with the sanitizer for the way
__has_feature is handled incorrectly.

[Bug sanitizer/109882] -fsanitize=thread #include transitively includes sanitizer/common_interface_defs.h

2023-05-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882

Andrew Pinski  changed:

   What|Removed |Added

  Component|libstdc++   |sanitizer
 CC||dodji at gcc dot gnu.org,
   ||dvyukov at gcc dot gnu.org,
   ||jakub at gcc dot gnu.org,
   ||kcc at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org

--- Comment #2 from Andrew Pinski  ---
Anyways I am going to declare this a bug in the sanitizer headers rather than
libstdc++ headers.