Hi,

As discussed on IRC, glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h
for ARM has a field named "unused", in a struct which looks like this:

  struct _libc_fpstate
  {
    struct
    {
      unsigned int sign1:1;
      unsigned int unused:15;
      unsigned int sign2:1;
      unsigned int exponent:14;
      unsigned int j:1;
      unsigned int mantissa1:31;
      unsigned int mantissa0:32;
    } fpregs[8];
    unsigned int fpsr:32;
    unsigned int fpcr:32;
    unsigned char ftype[8];
    unsigned int init_flag;
  };

The all_attributes testcase #defines unused to '1', giving
  unsigned int 1:15;
which is not going to work.

This patch just disables the check in this test case for
"unused" when testing for ARM, which resolves the issue.

Tested on arm-none-linux-gnueabihf to confirm it clears the FAIL.

OK?

Thanks,
James

---
2015-03-20  James Greenhalgh  <james.greenha...@arm.com>

        * testsuite/17_intro/headers/c++1998/all_attributes.cc: Disable
        test for unused for ARM.
        * testsuite/17_intro/headers/c++200x/all_attributes.cc: Likewise.
        * testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise.
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
index 6fc362a..7bc7ffe 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -30,7 +30,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <bits/extc++.h>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
index 0726e3f..8d93fd9 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
@@ -29,7 +29,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <codecvt>       // TODO: this is missing from <bits/stdc++.h>
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index 06bcb8e..c482fbd 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -29,7 +29,10 @@
 #endif
 #define packed 1
 #define pure 1
+// glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+#ifndef __arm__
 #define unused 1
+#endif
 
 #include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
 #include <shared_mutex>  // TODO: this is missing from <bits/stdc++.h>

Reply via email to