aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog11
-rw-r--r--gcc/c/c-decl.c16
-rw-r--r--gcc/c/c-parser.c20
3 files changed, 29 insertions, 18 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index cfbd164..05f3866 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,14 @@
+2019-06-05 Martin Sebor <msebor@redhat.com>
+
+ * c-decl.c (start_decl): Adjust quoting and hyphenation
+ in diagnostics.
+ (finish_decl): Same.
+ (finish_enum): Same.
+ (start_function): Same.
+ (declspecs_add_type): Same.
+ * c-parser.c (warn_for_abs): Same.
+ * c-typeck.c (build_binary_op): Same.
+
2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
PR c/89433
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 181a8c2..87ce853 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -5013,8 +5013,8 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs,
&& DECL_DECLARED_INLINE_P (decl)
&& DECL_UNINLINABLE (decl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (decl)))
- warning (OPT_Wattributes, "inline function %q+D given attribute noinline",
- decl);
+ warning (OPT_Wattributes, "inline function %q+D given attribute %qs",
+ decl, "noinline");
/* C99 6.7.4p3: An inline definition of a function with external
linkage shall not contain a definition of a modifiable object
@@ -5399,7 +5399,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
type = strip_array_types (type);
if (TREE_READONLY (decl))
warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wc___compat,
- "uninitialized const %qD is invalid in C++", decl);
+ "uninitialized %<const %D%> is invalid in C++", decl);
else if (RECORD_OR_UNION_TYPE_P (type)
&& C_TYPE_FIELDS_READONLY (type))
diagnose_uninitialized_cst_member (decl, type);
@@ -8674,7 +8674,7 @@ finish_enum (tree enumtype, tree values, tree attributes)
if (precision > TYPE_PRECISION (enumtype))
{
TYPE_PRECISION (enumtype) = 0;
- error ("specified mode too small for enumeral values");
+ error ("specified mode too small for enumerated values");
}
else
precision = TYPE_PRECISION (enumtype);
@@ -8935,8 +8935,8 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
&& DECL_UNINLINABLE (decl1)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (decl1)))
warning_at (loc, OPT_Wattributes,
- "inline function %qD given attribute noinline",
- decl1);
+ "inline function %qD given attribute %qs",
+ decl1, "noinline");
/* Handle gnu_inline attribute. */
if (declspecs->inline_p
@@ -10941,10 +10941,10 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs,
}
if (!targetm.decimal_float_supported_p ())
error_at (loc,
- ("decimal floating point not supported "
+ ("decimal floating-point not supported "
"for this target"));
pedwarn (loc, OPT_Wpedantic,
- "ISO C does not support decimal floating point");
+ "ISO C does not support decimal floating-point");
return specs;
case RID_FRACT:
case RID_ACCUM:
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 8f61024..84ee576 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -9420,7 +9420,7 @@ warn_for_abs (location_t loc, tree fndecl, tree arg)
if (SCALAR_FLOAT_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
"using integer absolute value function %qD when "
- "argument is of floating point type %qT",
+ "argument is of floating-point type %qT",
fndecl, atype);
else if (TREE_CODE (atype) == COMPLEX_TYPE)
warning_at (loc, OPT_Wabsolute_value,
@@ -9443,16 +9443,16 @@ warn_for_abs (location_t loc, tree fndecl, tree arg)
{
if (INTEGRAL_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
- "using floating point absolute value function %qD "
+ "using floating-point absolute value function %qD "
"when argument is of integer type %qT", fndecl, atype);
else if (DECIMAL_FLOAT_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
- "using floating point absolute value function %qD "
- "when argument is of decimal floating point type %qT",
+ "using floating-point absolute value function %qD "
+ "when argument is of decimal floating-point type %qT",
fndecl, atype);
else if (TREE_CODE (atype) == COMPLEX_TYPE)
warning_at (loc, OPT_Wabsolute_value,
- "using floating point absolute value function %qD when "
+ "using floating-point absolute value function %qD when "
"argument is of complex type %qT", fndecl, atype);
else
gcc_unreachable ();
@@ -9470,7 +9470,7 @@ warn_for_abs (location_t loc, tree fndecl, tree arg)
else if (SCALAR_FLOAT_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
"using complex absolute value function %qD when "
- "argument is of floating point type %qT",
+ "argument is of floating-point type %qT",
fndecl, atype);
else
gcc_unreachable ();
@@ -9486,17 +9486,17 @@ warn_for_abs (location_t loc, tree fndecl, tree arg)
{
if (INTEGRAL_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
- "using decimal floating point absolute value "
+ "using decimal floating-point absolute value "
"function %qD when argument is of integer type %qT",
fndecl, atype);
else if (SCALAR_FLOAT_TYPE_P (atype))
warning_at (loc, OPT_Wabsolute_value,
- "using decimal floating point absolute value "
- "function %qD when argument is of floating point "
+ "using decimal floating-point absolute value "
+ "function %qD when argument is of floating-point "
"type %qT", fndecl, atype);
else if (TREE_CODE (atype) == COMPLEX_TYPE)
warning_at (loc, OPT_Wabsolute_value,
- "using decimal floating point absolute value "
+ "using decimal floating-point absolute value "
"function %qD when argument is of complex type %qT",
fndecl, atype);
else