Fix most GCC attribute ignored warnings

llvm-svn: 267074
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 89dd1dd2782de71d56c512e44b9dfda2f7b95351
diff --git a/include/stdexcept b/include/stdexcept
index f251806..4218b13 100644
--- a/include/stdexcept
+++ b/include/stdexcept
@@ -53,7 +53,11 @@
 #ifndef _LIBCPP___REFSTRING
 _LIBCPP_BEGIN_NAMESPACE_STD
 class _LIBCPP_HIDDEN __libcpp_refstring {
-    const char *__imp_ _LIBCPP_UNUSED;
+#ifdef __clang__
+    const char *__imp_ __attribute__((__unused__)); // only clang emits a warning
+#else
+    const char *__imp_;
+#endif
 };
 _LIBCPP_END_NAMESPACE_STD
 #endif