]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/c-cppbuiltin.c
Add BID decimal support
[thirdparty/gcc.git] / gcc / c-cppbuiltin.c
index e9f608eff2ec696da0dcd1e1a41745cf06fd6d2a..d27b96bc6b328dd8b2450fd0251fa383ef40e5d8 100644 (file)
@@ -605,6 +605,17 @@ c_cpp_builtins (cpp_reader *pfile)
      new appearance would clobber any existing args.  */
   if (TARGET_DECLSPEC)
     builtin_define ("__declspec(x)=__attribute__((x))");
+
+  /* Tell the user whether decimal floating point is supported,
+     and if it is supported, whether the alternate format (BID)
+     is used over the standard (DPD) format.  */
+
+  if (ENABLE_DECIMAL_FLOAT)
+    {
+      cpp_define (pfile, "__STDC_WANT_DEC_FP__");
+      if (ENABLE_DECIMAL_BID_FORMAT)
+       cpp_define (pfile, "__DECIMAL_BID_FORMAT__");
+    }
 }
 
 /* Pass an object-like macro.  If it doesn't lie in the user's