Commit ab56cbed by Jonathan Wakely Committed by Jonathan Wakely

libstdc++/69406 Fix test to check for supported headers

	PR libstdc++/69406
	* include/bits/cpp_type_traits.h: Ensure C++ language linkage.
	* include/ext/type_traits.h: Likewise.
	* testsuite/17_intro/headers/c++2011/linkage.cc: Check autoconf macros
	for presence of C headers.
	* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Adjust
	dg-error line number.
	* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Likewise.

From-SVN: r232672
parent aede6748
2016-01-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/69406
* include/bits/cpp_type_traits.h: Ensure C++ language linkage.
* include/ext/type_traits.h: Likewise.
* testsuite/17_intro/headers/c++2011/linkage.cc: Check autoconf macros
for presence of C headers.
* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Adjust
dg-error line number.
* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Likewise.
2016-01-20 Torvald Riegel <triegel@redhat.com> 2016-01-20 Torvald Riegel <triegel@redhat.com>
PR libstdc++/69310 PR libstdc++/69310
......
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
// removed. // removed.
// //
extern "C++" {
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
...@@ -408,5 +410,6 @@ __INT_N(__GLIBCXX_TYPE_INT_N_3) ...@@ -408,5 +410,6 @@ __INT_N(__GLIBCXX_TYPE_INT_N_3)
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace
} // extern "C++"
#endif //_CPP_TYPE_TRAITS_H #endif //_CPP_TYPE_TRAITS_H
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <bits/c++config.h> #include <bits/c++config.h>
#include <bits/cpp_type_traits.h> #include <bits/cpp_type_traits.h>
extern "C++" {
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{ {
_GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_VERSION
...@@ -214,5 +216,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -214,5 +216,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace
} // extern "C++"
#endif #endif
...@@ -20,15 +20,23 @@ ...@@ -20,15 +20,23 @@
// libstdc++/69386 // libstdc++/69386
#include <bits/c++config.h>
extern "C" extern "C"
{ {
#include <assert.h> #include <assert.h>
#ifdef _GLIBCXX_HAVE_COMPLEX_H
#include <complex.h> #include <complex.h>
#endif
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#ifdef _GLIBCXX_HAVE_FENV_H
#include <fenv.h> #include <fenv.h>
#endif
#include <float.h> #include <float.h>
#ifdef _GLIBCXX_HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#endif
#include <iso646.h> #include <iso646.h>
#include <limits.h> #include <limits.h>
#include <locale.h> #include <locale.h>
...@@ -36,15 +44,27 @@ extern "C" ...@@ -36,15 +44,27 @@ extern "C"
#include <setjmp.h> #include <setjmp.h>
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef _GLIBCXX_HAVE_STDBOOL_H
#include <stdbool.h> #include <stdbool.h>
#endif
#include <stddef.h> #include <stddef.h>
#ifdef _GLIBCXX_HAVE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef _GLIBCXX_HAVE_TGMATH_H
#include <tgmath.h> #include <tgmath.h>
#endif
#include <time.h> #include <time.h>
#if __has_include(<uchar.h>)
#include <uchar.h> #include <uchar.h>
#endif
#ifdef _GLIBCXX_HAVE_WCHAR_H
#include <wchar.h> #include <wchar.h>
#endif
#ifdef _GLIBCXX_HAVE_WCTYPE_H
#include <wctype.h> #include <wctype.h>
#endif
} }
...@@ -35,4 +35,4 @@ int main() ...@@ -35,4 +35,4 @@ int main()
} }
// { dg-error "required from" "" { target *-*-* } 28 } // { dg-error "required from" "" { target *-*-* } 28 }
// { dg-error "no type" "" { target *-*-* } 69 } // { dg-error "no type" "" { target *-*-* } 71 }
...@@ -36,5 +36,5 @@ int main() ...@@ -36,5 +36,5 @@ int main()
} }
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
// { dg-error "declaration of" "" { target *-*-* } 98 } // { dg-error "declaration of" "" { target *-*-* } 100 }
// { dg-error "declaration of" "" { target *-*-* } 101 } // { dg-error "declaration of" "" { target *-*-* } 103 }
...@@ -35,4 +35,4 @@ int main() ...@@ -35,4 +35,4 @@ int main()
} }
// { dg-error "required from" "" { target *-*-* } 28 } // { dg-error "required from" "" { target *-*-* } 28 }
// { dg-error "no type" "" { target *-*-* } 112 } // { dg-error "no type" "" { target *-*-* } 114 }
...@@ -36,5 +36,5 @@ int main() ...@@ -36,5 +36,5 @@ int main()
} }
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 } // { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
// { dg-error "declaration of" "" { target *-*-* } 141 } // { dg-error "declaration of" "" { target *-*-* } 143 }
// { dg-error "declaration of" "" { target *-*-* } 144 } // { dg-error "declaration of" "" { target *-*-* } 146 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment