]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert backport revision.
authorMartin Liska <mliska@suse.cz>
Tue, 19 Sep 2017 08:17:20 +0000 (10:17 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 19 Sep 2017 08:17:20 +0000 (08:17 +0000)
From-SVN: r252966

gcc/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/pr81355.C [deleted file]

index bdb3c5190b6a283a8baa6c54e9a761f687549577..23d2985a862e1972b79ee61d61f621794e6d0e75 100644 (file)
@@ -1,3 +1,12 @@
+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
index 5089013ddcd496abe2e0eb573fc3974a1cf35040..d6572f71d0dcb99a99fcd19d9e1f3da5657bf17d 100644 (file)
@@ -9439,19 +9439,6 @@ handle_target_attribute (tree *node, tree name, tree args, int flags,
                                                      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;
 }
 
index bf4436f972e4945f9d3de7b27f374958b3810479..6f3740f88ce68eac4c7a90e6e982423d8a282b9d 100644 (file)
@@ -1,3 +1,11 @@
+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
diff --git a/gcc/testsuite/g++.dg/other/pr81355.C b/gcc/testsuite/g++.dg/other/pr81355.C
deleted file mode 100644 (file)
index 89d1b41..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* { 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();
-}