re PR c++/11357 ([DR 425] no conversion of build-in binary operator argument attempted)
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Wed, 17 Sep 2003 17:56:42 +0000 (17:56 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Wed, 17 Sep 2003 17:56:42 +0000 (17:56 +0000)
        PR c++/11357
        * c-pretty-print.c (pp_c_floating_constant): Append
        type-annotation to floating constants.

From-SVN: r71468

gcc/ChangeLog
gcc/c-pretty-print.c

index 517a876..ac84b97 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       PR c++/11357
+       * c-pretty-print.c (pp_c_floating_constant): Append
+       type-annotation to floating constants.
+
 2003-09-17  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * config/mips/iris5.h (TARGET_OS_CPP_BUILTINS): Define _LONGLONG.
index 0fd5bb1..7b4b273 100644 (file)
@@ -805,13 +805,18 @@ pp_c_enumeration_constant (c_pretty_printer *pp, tree e)
   return value_is_named;
 }
 
-/* Print out a REAL value.  */
+/* Print out a REAL value as a decimal-floating-constant.  */
+
 static inline void
 pp_c_floating_constant (c_pretty_printer *pp, tree r)
 {
   real_to_decimal (pp_buffer (pp)->digit_buffer, &TREE_REAL_CST (r),
                   sizeof (pp_buffer (pp)->digit_buffer), 0, 1);
   pp_string (pp, pp_buffer(pp)->digit_buffer);
+  if (TREE_TYPE (r) == float_type_node)
+    pp_character (pp, 'f');
+  else if (TREE_TYPE (r) == long_double_type_node)
+    pp_character (pp, 'l');
 }
 
 /* constant: