https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101055

            Bug ID: 101055
           Summary: should use __has_cpp_attribute() with __
                    prefixed/suffixed names
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

For example in <tuple> we see

#if __has_cpp_attribute(no_unique_address)

but then we use

      [[__no_unique_address__]] _Head _M_head_impl;

presumably to not cause issues with user-defined macros.  But the
__has_cpp_attribute check is also subject to macro expansion so we should
use the __X__ form consistently.

This seems to be the only use of __has_cpp_attribute in libstdc++.

Reply via email to