The __has_cpp_attribute() refers to the attributes supported by the C++ language. GCC returns its knowledge of the C++ attribute in C, even when the C code doesn't support it. N2335[1] added the C++ attribute syntax to the C language and N2553[2] added the __has_c_attribute() query syntax. Known attributes: From https://en.cppreference.com/w/c/language/attributes#Standard_attributes: * [[deprecated]] (from N2334) * [[fallthrough]] (from N2408) * [[nodiscard]] (from N2267, with message in N2448) * [[maybe_unused]] (from N2662) * [[noreturn]] (from N2764, which also deprecates _Noreturn) Drive-by remove C++11 & 14 support from [[nodiscard]] [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2335.pdf [2] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2553.pdf Change-Id: Ifd32b2557683218e0d26fffd5b58dedf7911f77a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 4cd66686e4fcf31ca1c8038c11125f90dc0b4782) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%