+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * c-attribs.c (handle_target_attribute):
+ Report warning for an empty string argument of target attribute.
+
2017-09-18 Richard Biener <rguenther@suse.de>
Backport from mainline
flags))
*no_add_attrs = true;
- /* Check that there's no empty string in values of the attribute. */
- for (tree t = args; t != NULL_TREE; t = TREE_CHAIN (t))
- {
- tree value = TREE_VALUE (t);
- if (TREE_CODE (value) == STRING_CST
- && TREE_STRING_LENGTH (value) == 1
- && TREE_STRING_POINTER (value)[0] == '\0')
- {
- warning (OPT_Wattributes, "empty string in attribute %<target%>");
- *no_add_attrs = true;
- }
- }
-
return NULL_TREE;
}
+2017-09-19 Martin Liska <mliska@suse.cz>
+
+ Revert backport:
+ 2017-08-10 Martin Liska <mliska@suse.cz>
+
+ PR c++/81355
+ * g++.dg/other/pr81355.C: New test.
+
2017-09-18 Richard Biener <rguenther@suse.de>
Backport from mainline
+++ /dev/null
-/* { dg-do compile { target x86_64-*-* } } */
-
-__attribute__((target("default")))
-int foo() {return 1;}
-
-__attribute__((target("arch=core2", "")))
-int foo2() {return 2;} /* { dg-warning "empty string in attribute .target." } */
-
-__attribute__((target("sse4.2", "", "")))
-int foo3() {return 2;} /* { dg-warning "empty string in attribute .target." } */
-
-int main() {
- return foo() + foo2() + foo3();
-}