diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-12-20 20:44:13 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-12-20 20:44:13 +0000 |
commit | 48b0b19630a19eaab06efd305387b930f94fc5d3 (patch) | |
tree | 79d9fc73e458081edfd36bdc00b3cb1ba3d1c859 /gcc/doc | |
parent | d8fa39bfc87c62cdd4970027dedbd982cc2049e1 (diff) | |
download | gcc-48b0b19630a19eaab06efd305387b930f94fc5d3.zip gcc-48b0b19630a19eaab06efd305387b930f94fc5d3.tar.gz gcc-48b0b19630a19eaab06efd305387b930f94fc5d3.tar.bz2 |
gcc:
* c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield)
(finish_struct): Refer to C11 in comments. Use flag_isoc11.
* c-parser.c (c_parser_static_assert_declaration)
(c_parser_static_assert_declaration_no_semi, c_parser_declspecs)
(c_parser_alignas_specifier, c_parser_alignof_expression): Refer
to C11 in comments. Use flag_isoc11.
* c-typeck.c (comptypes_check_different_types): Refer to C11 in
comment.
* doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x.
* doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference
to -std=c1x and -std=gnu1x.
* doc/extend.texi (Inline, Alternate Keywords, Other Builtins)
(__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11
instead of -std=c1x and C1X.
* doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in
preference to -std=c1x.
(-std=gnu11): Document in preference to -std=gnu1x.
* doc/standards.texi: Document C11 instead of C1X. Document C11
as actual standard. Document headers required from freestanding
C11 implementations.
* ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >=
201112L for C11. Update comments to refer to C11.
gcc/c-family:
* c-common.c (flag_isoc99): Update comment to refer to C11.
(flag_isoc1x): Change to flag_isoc11.
* c-common.h (flag_isoc99): Update comment to refer to C11.
(flag_isoc1x): Change to flag_isoc11.
* c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
C11.
* c-opts.c (set_std_c1x): Change to set_std_c11.
(c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
Call set_std_c11.
(set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
(set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
* c.opt (std=c1x): Change to std=c11. Document as non-draft
standard.
(std=c1x, std=iso9899:2011): Add as aliases of std=c11.
(std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
(std=gnu1x): Make alias of std=gnu11.
gcc/testsuite:
* gcc.dg/c11-version-1.c, gcc.dg/c11-version-2.c,
gcc.dg/c94-version-1.c, gcc.dg/c99-version-1.c,
gcc.dg/gnu11-version-1.c: New tests.
libcpp:
* include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
(CLK_STDC1X): Change to CLK_STDC11.
* init.c (lang_defaults): Update comments.
(cpp_init_builtins): Update language tests. Use 201112L for C11
__STDC_VERSION__.
From-SVN: r182551
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/cpp.texi | 2 | ||||
-rw-r--r-- | gcc/doc/cppopts.texi | 13 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 12 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 17 | ||||
-rw-r--r-- | gcc/doc/standards.texi | 23 |
5 files changed, 39 insertions, 28 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi index 821d816..230d32b 100644 --- a/gcc/doc/cpp.texi +++ b/gcc/doc/cpp.texi @@ -216,7 +216,7 @@ few things required by the standard. These are features which are rarely, if ever, used, and may cause surprising changes to the meaning of a program which does not expect them. To get strict ISO Standard C, you should use the @option{-std=c90}, @option{-std=c99} or -@option{-std=c1x} options, depending +@option{-std=c11} options, depending on which version of the standard you want. To get all the mandatory diagnostics, you must also use @option{-pedantic}. @xref{Invocation}. diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 6c70a0a..205d870 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -392,8 +392,11 @@ The 1990 C standard, as amended in 1994. The revised ISO C standard, published in December 1999. Before publication, this was known as C9X@. -@item c1x -The next version of the ISO C standard, still under development. +@item iso9899:2011 +@itemx c11 +@itemx c1x +The revised ISO C standard, published in December 2011. Before +publication, this was known as C1X@. @item gnu90 @itemx gnu89 @@ -403,9 +406,9 @@ The 1990 C standard plus GNU extensions. This is the default. @itemx gnu9x The 1999 C standard plus GNU extensions. -@item gnu1x -The next version of the ISO C standard, still under development, plus -GNU extensions. +@item gnu11 +@itemx gnu1x +The 2011 C standard plus GNU extensions. @item c++98 The 1998 ISO C++ standard plus amendments. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7f39a61..6c904c1 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -5298,8 +5298,8 @@ GCC implements three different semantics of declaring a function inline. One is available with @option{-std=gnu89} or @option{-fgnu89-inline} or when @code{gnu_inline} attribute is present on all inline declarations, another when -@option{-std=c99}, @option{-std=c1x}, -@option{-std=gnu99} or @option{-std=gnu1x} +@option{-std=c99}, @option{-std=c11}, +@option{-std=gnu99} or @option{-std=gnu11} (without @option{-fgnu89-inline}), and the third is used when compiling C++. @@ -6313,7 +6313,7 @@ a general-purpose header file that should be usable by all programs, including ISO C programs. The keywords @code{asm}, @code{typeof} and @code{inline} are not available in programs compiled with @option{-ansi} or @option{-std} (although @code{inline} can be used in a -program compiled with @option{-std=c99} or @option{-std=c1x}). The +program compiled with @option{-std=c99} or @option{-std=c11}). The ISO C99 keyword @code{restrict} is only available when @option{-std=gnu99} (which will eventually be the default) or @option{-std=c99} (or the equivalent @@ -7623,7 +7623,7 @@ be emitted. @opindex ansi @opindex std Outside strict ISO C mode (@option{-ansi}, @option{-std=c90}, -@option{-std=c99} or @option{-std=c1x}), the functions +@option{-std=c99} or @option{-std=c11}), the functions @code{_exit}, @code{alloca}, @code{bcmp}, @code{bzero}, @code{dcgettext}, @code{dgettext}, @code{dremf}, @code{dreml}, @code{drem}, @code{exp10f}, @code{exp10l}, @code{exp10}, @code{ffsll}, @@ -7843,7 +7843,7 @@ future revisions. @deftypefn {Built-in Function} @var{type} __builtin_complex (@var{real}, @var{imag}) The built-in function @code{__builtin_complex} is provided for use in -implementing the ISO C1X macros @code{CMPLXF}, @code{CMPLX} and +implementing the ISO C11 macros @code{CMPLXF}, @code{CMPLX} and @code{CMPLXL}. @var{real} and @var{imag} must have the same type, a real binary floating-point type, and the result has the corresponding complex type with real and imaginary parts @var{real} and @var{imag}. @@ -14123,7 +14123,7 @@ versions earlier than 4.4. @cindex @code{struct} @cindex @code{union} -As permitted by ISO C1X and for compatibility with other compilers, +As permitted by ISO C11 and for compatibility with other compilers, GCC allows you to define a structure or union that contains, as fields, structures and unions without names. For example: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d0d3243..36c37e0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1557,11 +1557,12 @@ ISO C99. Note that this standard is not yet fully supported; see @w{@uref{http://gcc.gnu.org/c99status.html}} for more information. The names @samp{c9x} and @samp{iso9899:199x} are deprecated. -@item c1x -ISO C1X, the draft of the next revision of the ISO C standard. -Support is limited and experimental and features enabled by this -option may be changed or removed if changed in or removed from the -standard draft. +@item c11 +@itemx c1x +@itemx iso9899:2011 +ISO C11, the 2011 revision of the ISO C standard. +Support is incomplete and experimental. The name @samp{c1x} is +deprecated. @item gnu90 @itemx gnu89 @@ -1573,10 +1574,10 @@ is the default for C code. GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC, this will become the default. The name @samp{gnu9x} is deprecated. +@item gnu11 @item gnu1x -GNU dialect of ISO C1X. Support is limited and experimental and -features enabled by this option may be changed or removed if changed -in or removed from the standard draft. +GNU dialect of ISO C11. Support is incomplete and experimental. The +name @samp{gnu1x} is deprecated. @item c++98 The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for diff --git a/gcc/doc/standards.texi b/gcc/doc/standards.texi index 90ddd47..4e288c6 100644 --- a/gcc/doc/standards.texi +++ b/gcc/doc/standards.texi @@ -33,6 +33,8 @@ with some exceptions, and possibly with some extensions. @cindex C99 @cindex ISO C9X @cindex C9X +@cindex ISO C11 +@cindex C11 @cindex ISO C1X @cindex C1X @cindex Technical Corrigenda @@ -95,9 +97,11 @@ Errors in the 1999 ISO C standard were corrected in three Technical Corrigenda published in 2001, 2004 and 2007. GCC does not support the uncorrected version. -A fourth version of the C standard, known as @dfn{C1X}, is under -development; GCC has limited preliminary support for parts of this -standard, enabled with @option{-std=c1x}. +A fourth version of the C standard, known as @dfn{C11}, was published +in 2011 as ISO/IEC 9899:2011. GCC has limited incomplete support for +parts of this standard, enabled with @option{-std=c11} or +@option{-std=iso9899:2011}. (While in development, drafts of this +standard version were referred to as @dfn{C1X}.) By default, GCC provides some extensions to the C language that on rare occasions conflict with the C standard. @xref{C @@ -106,12 +110,14 @@ Extensions,,Extensions to the C Language Family}. Use of the they conflict with the C standard version selected. You may also select an extended version of the C language explicitly with @option{-std=gnu90} (for C90 with GNU extensions), @option{-std=gnu99} -(for C99 with GNU extensions) or @option{-std=gnu1x} (for C1X with GNU +(for C99 with GNU extensions) or @option{-std=gnu11} (for C11 with GNU extensions). The default, if no C language dialect options are given, is @option{-std=gnu90}; this will change to -@option{-std=gnu99} in some future release when the C99 support is +@option{-std=gnu99} or @option{-std=gnu11} in some future release when +the C99 or C11 support is complete. Some features that are part of the C99 standard are -accepted as extensions in C90 mode. +accepted as extensions in C90 mode, and some features that are part of +the C11 standard are accepted as extensions in C90 and C99 modes. The ISO C standard defines (in clause 4) two classes of conforming implementation. A @dfn{conforming hosted implementation} supports the @@ -119,8 +125,9 @@ whole standard including all the library facilities; a @dfn{conforming freestanding implementation} is only required to provide certain library facilities: those in @code{<float.h>}, @code{<limits.h>}, @code{<stdarg.h>}, and @code{<stddef.h>}; since AMD1, also those in -@code{<iso646.h>}; and in C99, also those in @code{<stdbool.h>} and -@code{<stdint.h>}. In addition, complex types, added in C99, are not +@code{<iso646.h>}; since C99, also those in @code{<stdbool.h>} and +@code{<stdint.h>}; and since C11, also those in @code{<stdalign.h>} +and @code{<stdnoreturn.h>}. In addition, complex types, added in C99, are not required for freestanding implementations. The standard also defines two environments for programs, a @dfn{freestanding environment}, required of all implementations and which may not have library |