From: Paul Eggert Date: Fri, 6 Jan 2012 17:55:50 +0000 (-0800) Subject: doc: C11 and C++11 are now official X-Git-Tag: v0.1~1287 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=eec8a6915839cfe54a520732da01250cea844314;p=gnulib.git doc: C11 and C++11 are now official --- diff --git a/MODULES.html.sh b/MODULES.html.sh index 86e26c30f..a43684d02 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2329,14 +2329,14 @@ func_all_modules () 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" diff --git a/doc/posix-headers/assert.texi b/doc/posix-headers/assert.texi index aa78ee7bc..785a07aa9 100644 --- a/doc/posix-headers/assert.texi +++ b/doc/posix-headers/assert.texi @@ -10,7 +10,7 @@ See also the Gnulib module @code{assert}. 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 @@ and G++ versions through at least 4.6.0 do not support @code{static_assert}. 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{}. The Gnulib substitutes are macros that require including @code{}. @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. diff --git a/doc/posix-headers/stdalign.texi b/doc/posix-headers/stdalign.texi index bebc70d46..82c9e1c3e 100644 --- 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 diff --git a/doc/verify.texi b/doc/verify.texi index a978e432a..c661d469d 100644 --- a/doc/verify.texi +++ b/doc/verify.texi @@ -50,11 +50,11 @@ integer constant expression, then a compiler might reject a usage like @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 diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index 7d26a82ce..1e6c3b70c 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -1,4 +1,4 @@ -/* A substitute for ISO C 1x . +/* A substitute for ISO C11 . Copyright 2011-2012 Free Software Foundation, Inc. @@ -21,12 +21,14 @@ #ifndef _GL_STDALIGN_H #define _GL_STDALIGN_H -/* ISO C1X for platforms that lack it. +/* ISO C11 for platforms that lack it. References: - ISO C1X + ISO C11 (latest free draft + ) sections 6.5.3.4, 6.7.5, 7.15. - C++0X + C++11 (latest free draft + ) 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. diff --git a/lib/verify.h b/lib/verify.h index e9d666673..cef14ad15 100644 --- 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 @@ template 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 @@ template # 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 diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index d1be9e698..ae4d25483 100644 --- 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], [ ]) 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 @@ m4_ifndef([AS_VAR_IF], # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # . -# - 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 diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 5c9794207..9752ba568 100644 --- 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 diff --git a/modules/assert-h b/modules/assert-h index 85d6fc844..402586f2f 100644 --- a/modules/assert-h +++ b/modules/assert-h @@ -1,5 +1,5 @@ Description: -An that conforms to C1X. +An that conforms to C11. Files: lib/assert.in.h diff --git a/modules/snippet/_Noreturn b/modules/snippet/_Noreturn index 2b93a70a2..c35910ead 100644 --- a/modules/snippet/_Noreturn +++ b/modules/snippet/_Noreturn @@ -1,5 +1,5 @@ Description: -The _Noreturn keyword of C1X. +The _Noreturn keyword of C11. Applicability: all diff --git a/modules/stdalign b/modules/stdalign index c91e5e0dd..762239cf2 100644 --- a/modules/stdalign +++ b/modules/stdalign @@ -1,5 +1,5 @@ Description: -A that nearly conforms to ISO C1X and C++0X. +A that nearly conforms to ISO C11 and C++11. Files: lib/stdalign.in.h