return gnu_namespace_cache;
}
-/* Return base name of the attribute. Ie '__attr__' is turned into 'attr'.
- To avoid need for copying, we simply return length of the string. */
-
-static void
-extract_attribute_substring (struct substring *str)
-{
- canonicalize_attr_name (str->str, str->length);
-}
-
/* Insert SPECS into its namespace. IGNORED_P is true iff all unknown
attributes in this namespace should be ignored for the purposes of
-Wattributes. The function returns the namespace into which the
attr.str = IDENTIFIER_POINTER (name);
attr.length = IDENTIFIER_LENGTH (name);
- extract_attribute_substring (&attr);
return attrs->attribute_hash->find_with_hash (&attr,
substring_hash (attr.str,
attr.length));
--- /dev/null
+/* PR c++/113674 */
+/* { dg-do compile { target { c || c++11 } } } */
+/* { dg-options "" } */
+
+[[____noreturn____]] int foo (int i) /* { dg-warning "'__noreturn__' attribute (directive )?ignored" } */
+{
+ return i;
+}
+
+[[____maybe_unused____]] int bar (int i) /* { dg-warning "'__maybe_unused__' attribute (directive )?ignored" } */
+{
+ return i;
+}