https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24976

--- Comment #27 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Something like this should improve the diagnostic, note the patch needs to be
improved for wrapping:
diff --git a/libcpp/expr.cc b/libcpp/expr.cc
index 6e5bf68eae9..f70be382dd4 100644
--- a/libcpp/expr.cc
+++ b/libcpp/expr.cc
@@ -728,7 +728,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token
*token,
          else
            {
              cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0,
-                                  "invalid suffix \"%.*s\" on floating
constant",
+                                  "invalid suffix \"%.*s\" on floating
constant (maybe missing a space)",
                                   (int) (limit - str), str);
              return CPP_N_INVALID;
            }
@@ -753,7 +753,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token
*token,
       if ((result & CPP_N_DFLOAT) && radix != 10)
         {
           cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0,
-                              "invalid suffix \"%.*s\" with hexadecimal
floating constant",
+                              "invalid suffix \"%.*s\" with hexadecimal
floating constant (maybe missing a space)",
                               (int) (limit - str), str);
           return CPP_N_INVALID;
         }
@@ -789,7 +789,7 @@ cpp_classify_number (cpp_reader *pfile, const cpp_token
*token,
          else
            {
              cpp_error_with_line (pfile, CPP_DL_ERROR, virtual_location, 0,
-                                  "invalid suffix \"%.*s\" on integer
constant",
+                                  "invalid suffix \"%.*s\" on integer constant
(maybe missing a space)",
                                   (int) (limit - str), str);
              return CPP_N_INVALID;
            }

Reply via email to