diff options
author | Marek Polacek <polacek@redhat.com> | 2014-10-15 10:08:00 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-10-15 10:08:00 +0000 |
commit | d73326ca59c975967be01add1918f0743c779bb4 (patch) | |
tree | c9f5756cd1beeca56ec5d77216435248c56b4966 /gcc | |
parent | 13f447a33ca50156257d0cef0b707aa18416fa9b (diff) | |
download | gcc-d73326ca59c975967be01add1918f0743c779bb4.zip gcc-d73326ca59c975967be01add1918f0743c779bb4.tar.gz gcc-d73326ca59c975967be01add1918f0743c779bb4.tar.bz2 |
invoke.texi: Update to reflect that GNU11 is the default mode for C.
* doc/invoke.texi: Update to reflect that GNU11 is the default
mode for C.
* c-common.h (c_language_kind): Update comment.
c-family/
* c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
From-SVN: r216247
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 2 | ||||
-rw-r--r-- | gcc/c-family/c-opts.c | 3 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 7 |
5 files changed, 17 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 269ee36..9c3dcf4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-10-15 Marek Polacek <polacek@redhat.com> + + * doc/invoke.texi: Update to reflect that GNU11 is the default + mode for C. + * c-common.h (c_language_kind): Update comment. + 2014-10-15 Richard Biener <rguenther@suse.de> * hash-table.c: Include bconfig.h if building for the host. diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e630535..056a0d5 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2014-10-15 Marek Polacek <polacek@redhat.com> + + * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C. + 2014-10-14 DJ Delorie <dj@redhat.com> * c-pretty-print.c (pp_c_integer_constant): Check for all __intN diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index fd94d64..fec9a06 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -461,7 +461,7 @@ struct GTY(()) sorted_fields_type { typedef enum c_language_kind { - clk_c = 0, /* C90, C94 or C99 */ + clk_c = 0, /* C90, C94, C99 or C11 */ clk_objc = 1, /* clk_c with ObjC features. */ clk_cxx = 2, /* ANSI/ISO C++ */ clk_objcxx = 3 /* clk_cxx with ObjC features. */ diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 3f295d8..eb078e3 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -250,6 +250,9 @@ c_common_init_options (unsigned int decoded_options_count, if (c_language == clk_c) { + /* The default for C is gnu11. */ + set_std_c11 (false /* ISO */); + /* If preprocessing assembly language, accept any of the C-family front end options since the driver may pass them through. */ for (i = 1; i < decoded_options_count; i++) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2b62a73..f7055d0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1693,8 +1693,7 @@ interfaces) and L (Analyzability). The name @samp{c1x} is deprecated. @item gnu90 @itemx gnu89 -GNU dialect of ISO C90 (including some C99 features). This -is the default for C code. +GNU dialect of ISO C90 (including some C99 features). @item gnu99 @itemx gnu9x @@ -1702,8 +1701,8 @@ GNU dialect of ISO C99. The name @samp{gnu9x} is deprecated. @item gnu11 @itemx gnu1x -GNU dialect of ISO C11. This is intended to become the default in a -future release of GCC. The name @samp{gnu1x} is deprecated. +GNU dialect of ISO C11. This is the default for C code. +The name @samp{gnu1x} is deprecated. @item c++98 @itemx c++03 |