summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 10:08:00 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 10:08:00 +0000
commitb2601928b5bf34a817b5a9a2a371c476018e634d (patch)
treec9f5756cd1beeca56ec5d77216435248c56b4966
parentfecd2208d4a6cf0495139f8ff0ad667f92f78a56 (diff)
downloadgcc-b2601928b5bf34a817b5a9a2a371c476018e634d.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216247 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-family/ChangeLog4
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/c-family/c-opts.c3
-rw-r--r--gcc/doc/invoke.texi7
5 files changed, 17 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 269ee365ae5..9c3dcf4a6d1 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 e6305351986..056a0d52d2e 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 fd94d64009a..fec9a069191 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 3f295d80880..eb078e3f5cd 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 2b62a73c952..f7055d0a97f 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