]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
acinclude.m4: Check for <stdalign.h>
authorJonathan Wakely <jwakely.gcc@gmail.com>
Mon, 7 Nov 2011 08:46:58 +0000 (08:46 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 7 Nov 2011 08:46:58 +0000 (08:46 +0000)
* acinclude.m4: Check for <stdalign.h>
* configure: Regenerate.
* config.h.in: Likewise.
* include/Makefile.am: Add <cstdalign>.
* include/Makefile.in: Regenerate.
* include/c_global/cstdalign: New.
* testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: New.
* doc/xml/manual/backwards_compatibility.xml: Update.
* doc/xml/manual/status_cxx2011.xml: Update.

From-SVN: r181076

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure
libstdc++-v3/doc/xml/manual/backwards_compatibility.xml
libstdc++-v3/doc/xml/manual/status_cxx2011.xml
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/c_global/cstdalign [new file with mode: 0644]
libstdc++-v3/testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc [new file with mode: 0644]

index 408b0d4bc963b1ad024d3657adae1cb4fe73c01c..006d8751b2fdcb3938a351706813e7472898dee2 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * acinclude.m4: Check for <stdalign.h>
+       * configure: Regenerate.
+       * config.h.in: Likewise.
+       * include/Makefile.am: Add <cstdalign>.
+       * include/Makefile.in: Regenerate.
+       * include/c_global/cstdalign: New.
+       * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: New.
+       * doc/xml/manual/backwards_compatibility.xml: Update.
+       * doc/xml/manual/status_cxx2011.xml: Update.
+
 2011-11-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        PR libstdc++/50982
index 684a2958ce807d946d969274de3ac3f26bab9c29..3464b76b79c1d39ce76e4091e4b0070e005fffe0 100644 (file)
@@ -1641,6 +1641,9 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
   # Check for the existence of the <stdbool.h> header.
   AC_CHECK_HEADERS(stdbool.h)
 
+  # Check for the existence of the <stdalign.h> header.
+  AC_CHECK_HEADERS(stdalign.h)
+
   CXXFLAGS="$ac_save_CXXFLAGS"
   AC_LANG_RESTORE
 ])
index f82d91ad41723ca4f32a19ea826849d859b62b4f..82ccd4e1a9d38741a57806f23f618e37681be68a 100644 (file)
 /* Define to 1 if you have the `sqrtl' function. */
 #undef HAVE_SQRTL
 
+/* Define to 1 if you have the <stdalign.h> header file. */
+#undef HAVE_STDALIGN_H
+
 /* Define to 1 if you have the <stdbool.h> header file. */
 #undef HAVE_STDBOOL_H
 
index 428cdc5bd805076260956f4b7d8a7a5a4dda3b48..94b29a08a2707144597fa42a273fe962bb01cef4 100755 (executable)
@@ -19102,6 +19102,20 @@ _ACEOF
 
 fi
 
+done
+
+
+  # Check for the existence of the <stdalign.h> header.
+  for ac_header in stdalign.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdalign_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDALIGN_H 1
+_ACEOF
+
+fi
+
 done
 
 
index b69ac4d12d23d6efa2d638ff949a95e1fc5c0994..525157f181404b49738315cbf2d4d011c0e5e6df 100644 (file)
@@ -1135,7 +1135,7 @@ AC_DEFUN([AC_HEADER_STDCXX_11], [
     #include &lt;cmath&gt;
     #include &lt;csetjmp&gt;
     #include &lt;csignal&gt;
-    // #include &lt;cstdalign&gt;
+    #include &lt;cstdalign&gt;
     #include &lt;cstdarg&gt;
     #include &lt;cstdbool&gt;
     #include &lt;cstddef&gt;
index 7f0625492b262348947351d5a3902cbd3ed5980a..2715b2a77abb7feb04157bcdf01ef513444db4c3 100644 (file)
@@ -253,11 +253,10 @@ particular release.
       <entry/>
     </row>
     <row>
-      <?dbhtml bgcolor="#B0B0B0" ?>
       <entry>18.10</entry>
       <entry>Other runtime support</entry>
-      <entry>Partial</entry>
-      <entry>Missing <filename class="headerfile">&lt;cstdalign&gt;</filename> </entry>
+      <entry>Y</entry>
+      <entry/>
     </row>
     <row>
       <entry>
index bc4594db4a35c15f8f713413614c855b1a83efee..732f7bcad0b06b2b3de72455206b9ba3a8a4791f 100644 (file)
@@ -634,6 +634,7 @@ c_base_headers = \
        ${c_base_srcdir}/cmath \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
+       ${c_base_srcdir}/cstdalign \
        ${c_base_srcdir}/cstdarg \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
index 3b31e8a2c5d19f1ff9dd151c0fc1d7fe10172cd8..3d4330c663e2ad39f74cd3e287a07a5ef7676ab3 100644 (file)
@@ -885,6 +885,7 @@ c_base_headers = \
        ${c_base_srcdir}/cmath \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
+       ${c_base_srcdir}/cstdalign \
        ${c_base_srcdir}/cstdarg \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
diff --git a/libstdc++-v3/include/c_global/cstdalign b/libstdc++-v3/include/c_global/cstdalign
new file mode 100644 (file)
index 0000000..31f0c1b
--- /dev/null
@@ -0,0 +1,44 @@
+// <cstdalign> -*- C++ -*-
+
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdalign
+ *  This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CSTDALIGN
+#define _GLIBCXX_CSTDALIGN 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#  include <bits/c++0x_warning.h>
+#else
+#  include <bits/c++config.h>
+#  if _GLIBCXX_HAVE_STDALIGN_H
+#    include <stdalign.h>
+#  endif
+#endif
+
+#endif 
+
diff --git a/libstdc++-v3/testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc b/libstdc++-v3/testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc
new file mode 100644 (file)
index 0000000..a72d65f
--- /dev/null
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++98" }
+
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <cstdalign>
+
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
+