From: Jonathan Wakely Date: Mon, 7 Nov 2011 08:46:58 +0000 (+0000) Subject: acinclude.m4: Check for X-Git-Tag: releases/gcc-4.7.0~2417 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0f0ee74f00a58dc356ab1ac23638c97d505eb8d;p=thirdparty%2Fgcc.git acinclude.m4: Check for * acinclude.m4: Check for * configure: Regenerate. * config.h.in: Likewise. * include/Makefile.am: Add . * 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 408b0d4bc963..006d8751b2fd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2011-11-07 Jonathan Wakely + + * acinclude.m4: Check for + * configure: Regenerate. + * config.h.in: Likewise. + * include/Makefile.am: Add . + * 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 PR libstdc++/50982 diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 684a2958ce80..3464b76b79c1 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1641,6 +1641,9 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ # Check for the existence of the header. AC_CHECK_HEADERS(stdbool.h) + # Check for the existence of the header. + AC_CHECK_HEADERS(stdalign.h) + CXXFLAGS="$ac_save_CXXFLAGS" AC_LANG_RESTORE ]) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index f82d91ad4172..82ccd4e1a9d3 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -330,6 +330,9 @@ /* Define to 1 if you have the `sqrtl' function. */ #undef HAVE_SQRTL +/* Define to 1 if you have the header file. */ +#undef HAVE_STDALIGN_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 428cdc5bd805..94b29a08a270 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -19102,6 +19102,20 @@ _ACEOF fi +done + + + # Check for the existence of the 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 diff --git a/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml b/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml index b69ac4d12d23..525157f18140 100644 --- a/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml +++ b/libstdc++-v3/doc/xml/manual/backwards_compatibility.xml @@ -1135,7 +1135,7 @@ AC_DEFUN([AC_HEADER_STDCXX_11], [ #include <cmath> #include <csetjmp> #include <csignal> - // #include <cstdalign> + #include <cstdalign> #include <cstdarg> #include <cstdbool> #include <cstddef> diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml index 7f0625492b26..2715b2a77abb 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2011.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2011.xml @@ -253,11 +253,10 @@ particular release. - 18.10 Other runtime support - Partial - Missing <cstdalign> + Y + diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index bc4594db4a35..732f7bcad0b0 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -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 \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 3b31e8a2c5d1..3d4330c663e2 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -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 index 000000000000..31f0c1b384e8 --- /dev/null +++ b/libstdc++-v3/include/c_global/cstdalign @@ -0,0 +1,44 @@ +// -*- 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 +// . + +/** @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 +#else +# include +# if _GLIBCXX_HAVE_STDALIGN_H +# include +# 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 index 000000000000..a72d65faf737 --- /dev/null +++ b/libstdc++-v3/testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc @@ -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 +// . + +#include + +// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 } +