public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4572] Revert "target: support spaces in target attribute."
@ 2021-10-20 12:50 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-10-20 12:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:39175be0fa2272116beef182ea80a5c91cfeb5fa

commit r12-4572-g39175be0fa2272116beef182ea80a5c91cfeb5fa
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 20 14:49:35 2021 +0200

    Revert "target: support spaces in target attribute."
    
    This reverts commit df592811f950301ed3b10a08e476dad0f2eff26a.

Diff:
---
 gcc/config/i386/i386-options.c           |  2 --
 gcc/system.h                             | 21 ---------------------
 gcc/testsuite/gcc.target/i386/pr102374.c |  3 ---
 3 files changed, 26 deletions(-)

diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c
index c9523b26f49..e7a3bd4aaea 100644
--- a/gcc/config/i386/i386-options.c
+++ b/gcc/config/i386/i386-options.c
@@ -1146,8 +1146,6 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
 	  next_optstr = NULL;
 	}
 
-      p = strip_whitespaces (p, &len);
-
       /* Recognize no-xxx.  */
       if (len > 3 && p[0] == 'n' && p[1] == 'o' && p[2] == '-')
 	{
diff --git a/gcc/system.h b/gcc/system.h
index 17a6a553b0b..adde3e264b6 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1305,25 +1305,4 @@ startswith (const char *str, const char *prefix)
   return strncmp (str, prefix, strlen (prefix)) == 0;
 }
 
-/* Strip white spaces from STRING with LEN length.
-   A stripped string is returned and LEN is updated accordingly.  */
-
-static inline char *
-strip_whitespaces (char *string, size_t *len)
-{
-  while (string[0] == ' ' || string[0] == '\t')
-    {
-      --(*len);
-      ++string;
-    }
-
-  while (string[*len - 1] == ' ' || string[*len - 1] == '\t')
-    {
-      string[*len - 1] = '\0';
-      --(*len);
-    }
-
-  return string;
-}
-
 #endif /* ! GCC_SYSTEM_H */
diff --git a/gcc/testsuite/gcc.target/i386/pr102374.c b/gcc/testsuite/gcc.target/i386/pr102374.c
deleted file mode 100644
index 21aa76011ed..00000000000
--- a/gcc/testsuite/gcc.target/i386/pr102374.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* PR target/102374 */
-
-void calculate_sse(void) __attribute__ ((__target__ ("	no-avx, sse2   ")));


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-20 12:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 12:50 [gcc r12-4572] Revert "target: support spaces in target attribute." Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).