Mercurial > hg > octave-lyh > gnulib-hg
changeset 16239:91f53c1e1787
doc: C11 and C++11 are now official
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 06 Jan 2012 09:55:50 -0800 |
parents | e9c8714bdbbc |
children | 9fb16282cf63 |
files | MODULES.html.sh doc/posix-headers/assert.texi doc/posix-headers/stdalign.texi doc/verify.texi lib/stdalign.in.h lib/verify.h m4/gnulib-common.m4 m4/stdalign.m4 modules/assert-h modules/snippet/_Noreturn modules/stdalign |
diffstat | 11 files changed, 33 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2329,14 +2329,14 @@ func_module mbfile func_end_table - element="Support for systems lacking draft ISO C 1X" - func_section_wrap c1x_sup + element="Support for systems lacking ISO C11" + func_section_wrap c11_sup func_wrap H2 func_echo "$element" element="Core language properties" element=`printf "%s" "$element" | sed -e "$sed_lt" -e "$sed_gt"` - func_section_wrap c1x_core_properties + func_section_wrap c11_core_properties func_wrap H3 func_echo "$element"
--- a/doc/posix-headers/assert.texi +++ b/doc/posix-headers/assert.texi @@ -10,7 +10,7 @@ Portability problems fixed by Gnulib: @itemize @item -The draft C1X and C++0X @code{static_assert}, and the draft C1X +The C11 and C++11 @code{static_assert}, and the C11 @code{_Static_assert}, are not supported by many platforms. For example, GCC versions before 4.6.0 do not support @code{_Static_assert}, and G++ versions through at least 4.6.0 do not support @code{static_assert}. @@ -19,11 +19,11 @@ Portability problems not fixed by Gnulib: @itemize @item -Draft C1X @code{_Static_assert} and draft C++0X @code{static_assert} +C11 @code{_Static_assert} and C++11 @code{static_assert} are keywords that can be used without including @code{<assert.h>}. The Gnulib substitutes are macros that require including @code{<assert.h>}. @item -The draft C1X @code{static_assert} and @code{_Static_assert} can also +The C11 @code{static_assert} and @code{_Static_assert} can also be used within a @code{struct} or @code{union} specifier, in place of an ordinary declaration of a member of the struct or union. The Gnulib substitute can be used only as an ordinary declaration.
--- a/doc/posix-headers/stdalign.texi +++ b/doc/posix-headers/stdalign.texi @@ -2,9 +2,11 @@ @section @file{stdalign.h} POSIX specification:@* Not in POSIX yet, but we expect it will be. -ISO C1X @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf} +ISO C11 (latest free draft +@url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf}) sections 6.5.3.4, 6.7.5, 7.15. -C++0X @url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf} +C++11 (latest free draft +@url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf}) section 18.10. Gnulib module: stdalign
--- a/doc/verify.texi +++ b/doc/verify.texi @@ -50,11 +50,11 @@ @samp{verify (@var{V});} even when @var{V} is nonzero. -Although the standard @code{assert} macro is a runtime test, draft C1X +Although the standard @code{assert} macro is a runtime test, C11 specifies a builtin @code{_Static_assert (@var{V}, @var{STRING-LITERAL})}, its @file{assert.h} header has a similar macro -named @code{static_assert}, and draft C++0X has a similar -@code{static_assert} builtin. These draft builtins and macros differ +named @code{static_assert}, and C++11 has a similar +@code{static_assert} builtin. These builtins and macros differ from @code{verify} in two major ways. First, they can also be used within a @code{struct} or @code{union} specifier, in place of an ordinary member declaration. Second, they require the programmer to
--- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -1,4 +1,4 @@ -/* A substitute for ISO C 1x <stdalign.h>. +/* A substitute for ISO C11 <stdalign.h>. Copyright 2011-2012 Free Software Foundation, Inc. @@ -21,12 +21,14 @@ #ifndef _GL_STDALIGN_H #define _GL_STDALIGN_H -/* ISO C1X <stdalign.h> for platforms that lack it. +/* ISO C11 <stdalign.h> for platforms that lack it. References: - ISO C1X <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf> + ISO C11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>) sections 6.5.3.4, 6.7.5, 7.15. - C++0X <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf> + C++11 (latest free draft + <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>) section 18.10. */ /* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment @@ -68,7 +70,7 @@ To be portable to Sun C 5.11, do not align auto variables to anything stricter than their default alignment. - The following draft C1X requirements are not supported here: + The following C11 requirements are not supported here: - If A is zero, alignas has no effect. - alignas can be used multiple times; the strictest one wins.
--- a/lib/verify.h +++ b/lib/verify.h @@ -21,13 +21,11 @@ # define _GL_VERIFY_H -/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per the - C1X draft N1548 section 6.7.10. This is supported by GCC 4.6.0 and - later, in C mode, and its use here generates easier-to-read diagnostics - when verify (R) fails. +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. + This is supported by GCC 4.6.0 and later, in C mode, and its use + here generates easier-to-read diagnostics when verify (R) fails. - Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per the - C++0X draft N3242 section 7.(4). + Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. This will likely be supported by future GCC versions, in C++ mode. Use this only with GCC. If we were willing to slow 'configure' @@ -188,7 +186,7 @@ trailing ';'. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. - Unfortunately, unlike C1X, this implementation must appear as an + Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ # ifdef _GL_HAVE__STATIC_ASSERT @@ -205,7 +203,7 @@ # define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif # if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* Draft C1X requires this #define. */ +# define static_assert _Static_assert /* C11 requires this #define. */ # endif # endif
--- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 31 +# gnulib-common.m4 serial 32 dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,7 @@ ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of draft C1X. */ +[/* The _Noreturn keyword of C11. */ #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) @@ -224,7 +224,7 @@ # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>. -# - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard. +# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ dnl Change that version number to the minimum Autoconf version that supports
--- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -1,4 +1,4 @@ -# Check for stdalign.h that conforms to C1x. +# Check for stdalign.h that conforms to C11. dnl Copyright 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation
--- a/modules/assert-h +++ b/modules/assert-h @@ -1,5 +1,5 @@ Description: -An <assert.h> that conforms to C1X. +An <assert.h> that conforms to C11. Files: lib/assert.in.h