summaryrefslogtreecommitdiff
path: root/gcc/ginclude
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-25 21:54:22 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-25 21:54:22 +0000
commit39012afb52bcbeb198c90671aaece181d542728a (patch)
treefeff2a16895d1da5319551fc1b48b05b2a464692 /gcc/ginclude
parentd25092869c9e4dd8b8d56b60226200c14d7fa280 (diff)
downloadgcc-39012afb52bcbeb198c90671aaece181d542728a.tar.gz
gcc:
* 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
Diffstat (limited to 'gcc/ginclude')
-rw-r--r--gcc/ginclude/float.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/ginclude/float.h b/gcc/ginclude/float.h
index 9969f1c883a..5c472c54375 100644
--- a/gcc/ginclude/float.h
+++ b/gcc/ginclude/float.h
@@ -157,6 +157,45 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif /* C99 */
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ > 199901L
+/* Versions of DECIMAL_DIG for each floating-point type. */
+#undef FLT_DECIMAL_DIG
+#undef DBL_DECIMAL_DIG
+#undef LDBL_DECIMAL_DIG
+#define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
+#define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
+#define LDBL_DECIMAL_DIG __DECIMAL_DIG__
+
+/* Whether types support subnormal numbers. */
+#undef FLT_HAS_SUBNORM
+#undef DBL_HAS_SUBNORM
+#undef LDBL_HAS_SUBNORM
+#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
+#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
+#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
+
+/* Minimum positive values, including subnormals. */
+#undef FLT_TRUE_MIN
+#undef DBL_TRUE_MIN
+#undef LDBL_TRUE_MIN
+#if __FLT_HAS_DENORM__
+#define FLT_TRUE_MIN __FLT_DENORM_MIN__
+#else
+#define FLT_TRUE_MIN __FLT_MIN__
+#endif
+#if __DBL_HAS_DENORM__
+#define DBL_TRUE_MIN __DBL_DENORM_MIN__
+#else
+#define DBL_TRUE_MIN __DBL_MIN__
+#endif
+#if __LDBL_HAS_DENORM__
+#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
+#else
+#define LDBL_TRUE_MIN __LDBL_MIN__
+#endif
+
+#endif /* C1X */
+
#ifdef __STDC_WANT_DEC_FP__
/* Draft Technical Report 24732, extension for decimal floating-point
arithmetic: Characteristic of decimal floating types <float.h>. */