* c-common.c (flag_isoc1x): New.
(flag_isoc99): Update comment.
* c-common.h (flag_isoc1x): New.
(flag_isoc99): Update comment.
* c-cppbuiltin.c (builtin_define_float_constants): Also define
__<type>_DECIMAL_DIG__.
* c-opts.c (set_std_c1x): New.
(c_common_handle_option): Handle -std=c1x and -std=gnu1x.
(set_std_c89, set_std_c99): Also set flag_isoc1x to 0.
* c.opt (-std=c1x, -std=gnu1x): New options.
* doc/cpp.texi: Mention -std=c1x.
* doc/cppopts.texi (-std=c1x, -std=gnu1x): Document.
* doc/extend.texi: Mention -std=c1x and -std=gnu1x.
* doc/invoke.texi (-std=c1x, -std=gnu1x): Document.
* doc/standards.texi: Mention C1X.
* ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG,
LDBL_DECIMAL_DIG, FLT_HAS_SUBNORM, DBL_HAS_SUBNORM,
LDBL_HAS_SUBNORM, FLT_TRUE_MIN, DBL_TRUE_MIN, LDBL_TRUE_MIN):
Define for C1X.
gcc/testsuite:
* gcc.dg/c90-float-1.c: Also test that C1X macros are not defined.
* gcc.dg/c99-float-1.c: Also test that C1X macros are not defined.
* gcc.dg/c1x-float-1.c: New test.
libcpp:
* include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
* init.c (lang_defaults): Add entries for new language variants.
(cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
variants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158711
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-04-25 Joseph Myers <joseph@codesourcery.com>
+
+ * c-common.c (flag_isoc1x): New.
+ (flag_isoc99): Update comment.
+ * c-common.h (flag_isoc1x): New.
+ (flag_isoc99): Update comment.
+ * c-cppbuiltin.c (builtin_define_float_constants): Also define
+ __<type>_DECIMAL_DIG__.
+ * c-opts.c (set_std_c1x): New.
+ (c_common_handle_option): Handle -std=c1x and -std=gnu1x.
+ (set_std_c89, set_std_c99): Also set flag_isoc1x to 0.
+ * c.opt (-std=c1x, -std=gnu1x): New options.
+ * doc/cpp.texi: Mention -std=c1x.
+ * doc/cppopts.texi (-std=c1x, -std=gnu1x): Document.
+ * doc/extend.texi: Mention -std=c1x and -std=gnu1x.
+ * doc/invoke.texi (-std=c1x, -std=gnu1x): Document.
+ * doc/standards.texi: Mention C1X.
+ * ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG,
+ LDBL_DECIMAL_DIG, FLT_HAS_SUBNORM, DBL_HAS_SUBNORM,
+ LDBL_HAS_SUBNORM, FLT_TRUE_MIN, DBL_TRUE_MIN, LDBL_TRUE_MIN):
+ Define for C1X.
+
2010-04-25 Uros Bizjak <ubizjak@gmail.com>
* config/i386/gmon-sol2.c (_mcleanup): Change format string
int flag_isoc94;
-/* Nonzero means use the ISO C99 dialect of C. */
+/* Nonzero means use the ISO C99 (or C1X) dialect of C. */
int flag_isoc99;
+/* Nonzero means use the ISO C1X dialect of C. */
+
+int flag_isoc1x;
+
/* Nonzero means that we have builtin functions, and main is an int. */
int flag_hosted = 1;
extern int flag_isoc94;
-/* Nonzero means use the ISO C99 dialect of C. */
+/* Nonzero means use the ISO C99 (or C1X) dialect of C. */
extern int flag_isoc99;
+/* Nonzero means use the ISO C1X dialect of C. */
+
+extern int flag_isoc1x;
+
/* Nonzero means that we have builtin functions, and main is an int. */
extern int flag_hosted;
@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 gnu90
@itemx gnu89
GNU dialect of ISO C90 (including some C99 features). This
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 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.
+
@item c++98
The 1998 ISO C++ standard plus amendments. Same as @option{-ansi} for
C++ code.
+2010-04-25 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c90-float-1.c: Also test that C1X macros are not defined.
+ * gcc.dg/c99-float-1.c: Also test that C1X macros are not defined.
+ * gcc.dg/c1x-float-1.c: New test.
+
2010-04-25 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/pr43766.c: Scan "lea\[lq\]?\[ \t\]" instead
+2010-04-25 Joseph Myers <joseph@codesourcery.com>
+
+ * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X.
+ * init.c (lang_defaults): Add entries for new language variants.
+ (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X
+ variants.
+
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR cpp/43195