[libstdc++] Fix 17_intro/names.cc on SPARC/Linux

Message ID 6741390.99XH3mjCFH@polaris
State New
Headers show
Series
  • [libstdc++] Fix 17_intro/names.cc on SPARC/Linux
Related show

Commit Message

Eric Botcazou Jan. 16, 2018, 8:40 p.m.
The SPARC-V8 architecture contains a Y register so <bits/sigcontext.h> defines 
a structure with a 'y' field on Linux.

Tested on SPARC64/Linux, applied on the mainline and 7 branch as obvious.


2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>

	* testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.

-- 
Eric Botcazou

Patch

Index: testsuite/17_intro/names.cc
===================================================================
--- testsuite/17_intro/names.cc	(revision 256562)
+++ testsuite/17_intro/names.cc	(working copy)
@@ -112,4 +112,8 @@ 
 #undef r
 #endif
 
+#if defined (__linux__) && defined (__sparc__)
+#undef y
+#endif
+
 #include <bits/stdc++.h>