aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog18
-rw-r--r--gcc/cp/call.c16
-rw-r--r--gcc/cp/constexpr.c4
-rw-r--r--gcc/cp/constraint.cc6
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/decl.c12
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/cp/typeck.c8
8 files changed, 43 insertions, 25 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 31d9871..0056cc2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,21 @@
+2019-06-05 Martin Sebor <msebor@redhat.com>
+
+ * call.c (build_conditional_expr_1): Adjust quoting and hyphenation.
+ (convert_like_real): Same.
+ (convert_arg_to_ellipsis): Same.
+ * constexpr.c (diag_array_subscript): Same.
+ * constraint.cc (diagnose_trait_expression): Same.
+ * cvt.c (ocp_convert): Same.
+ * decl.c (start_decl): Same.
+ (check_for_uninitialized_const_var): Same.
+ (grokfndecl): Same.
+ (check_special_function_return_type): Same.
+ (finish_enum_value_list): Same.
+ (start_preparsed_function): Same.
+ * parser.c (cp_parser_decl_specifier_seq): Same.
+ * typeck.c (cp_build_binary_op): Same.
+ (build_static_cast_1): Same.
+
2019-06-04 Nina Dinka Ranns <dinka.ranns@gmail.com>
PR c++/63149 - Wrong auto deduction from braced-init-list.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 4d9331f..c04ca2e 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -5067,7 +5067,7 @@ build_conditional_expr_1 (const op_location_t &loc,
{
if (complain & tf_error)
error_at (loc, "inferred scalar type %qT is not an integer or "
- "floating point type of the same size as %qT", stype,
+ "floating-point type of the same size as %qT", stype,
COMPARISON_CLASS_P (arg1)
? TREE_TYPE (TREE_TYPE (TREE_OPERAND (arg1, 0)))
: ctype);
@@ -5486,8 +5486,8 @@ build_conditional_expr_1 (const op_location_t &loc,
/* Two enumerators from the same enumeration can have different
types when the enumeration is still being defined. */;
else if (complain & tf_warning)
- warning_at (loc, OPT_Wenum_compare, "enumeral mismatch in "
- "conditional expression: %qT vs %qT",
+ warning_at (loc, OPT_Wenum_compare, "enumerated mismatch "
+ "in conditional expression: %qT vs %qT",
arg2_type, arg3_type);
}
else if (extra_warnings
@@ -5498,8 +5498,8 @@ build_conditional_expr_1 (const op_location_t &loc,
type_promotes_to (arg3_type)))))
{
if (complain & tf_warning)
- warning_at (loc, OPT_Wextra, "enumeral and non-enumeral type in "
- "conditional expression");
+ warning_at (loc, OPT_Wextra, "enumerated and non-enumerated "
+ "type in conditional expression");
}
arg2 = perform_implicit_conversion (result_type, arg2, complain);
@@ -7380,7 +7380,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
/* If the reference is volatile or non-const, we
cannot create a temporary. */
if (lvalue & clk_bitfield)
- error_at (loc, "cannot bind bitfield %qE to %qT",
+ error_at (loc, "cannot bind bit-field %qE to %qT",
expr, ref_type);
else if (lvalue & clk_packed)
error_at (loc, "cannot bind packed field %qE to %qT",
@@ -7487,8 +7487,8 @@ convert_arg_to_ellipsis (tree arg, tsubst_flags_t complain)
/* [expr.call]
If the argument has integral or enumeration type that is subject
- to the integral promotions (_conv.prom_), or a floating point
- type that is subject to the floating point promotion
+ to the integral promotions (_conv.prom_), or a floating-point
+ type that is subject to the floating-point promotion
(_conv.fpprom_), the value of the argument is converted to the
promoted type before the call. */
if (TREE_CODE (arg_type) == REAL_TYPE
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 84c9834..15bfb6d 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -2483,7 +2483,7 @@ diag_array_subscript (const constexpr_ctx *ctx, tree array, tree index)
error ("array subscript value %qE is outside the bounds "
"of array %qD of type %qT", sidx, array, arraytype);
else
- error ("non-zero array subscript %qE is used with array %qD of "
+ error ("nonzero array subscript %qE is used with array %qD of "
"type %qT with unknown bounds", sidx, array, arraytype);
inform (DECL_SOURCE_LOCATION (array), "declared here");
}
@@ -2491,7 +2491,7 @@ diag_array_subscript (const constexpr_ctx *ctx, tree array, tree index)
error ("array subscript value %qE is outside the bounds "
"of array type %qT", sidx, arraytype);
else
- error ("non-zero array subscript %qE is used with array of type %qT "
+ error ("nonzero array subscript %qE is used with array of type %qT "
"with unknown bounds", sidx, arraytype);
}
}
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index 9884eb0..ed39ecc 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -2693,13 +2693,13 @@ diagnose_trait_expression (location_t loc, tree, tree cur, tree args)
switch (TRAIT_EXPR_KIND (expr))
{
case CPTK_HAS_NOTHROW_ASSIGN:
- inform (loc, " %qT is not nothrow copy assignable", t1);
+ inform (loc, " %qT is not %<nothrow%> copy assignable", t1);
break;
case CPTK_HAS_NOTHROW_CONSTRUCTOR:
- inform (loc, " %qT is not nothrow default constructible", t1);
+ inform (loc, " %qT is not %<nothrow%> default constructible", t1);
break;
case CPTK_HAS_NOTHROW_COPY:
- inform (loc, " %qT is not nothrow copy constructible", t1);
+ inform (loc, " %qT is not %<nothrow%> copy constructible", t1);
break;
case CPTK_HAS_TRIVIAL_ASSIGN:
inform (loc, " %qT is not trivially copy assignable", t1);
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 7ebbf3c..1c405ec 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -883,7 +883,7 @@ ocp_convert (tree type, tree expr, int convtype, int flags,
return rval;
else if (complain & tf_error)
error_at (loc,
- "%q#T used where a floating point value was expected",
+ "%q#T used where a floating-point value was expected",
TREE_TYPE (e));
}
if (code == REAL_TYPE)
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 23b2a4c..f342f8b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5131,7 +5131,7 @@ start_decl (const cp_declarator *declarator,
&& DECL_UNINLINABLE (decl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (decl)))
warning_at (DECL_SOURCE_LOCATION (decl), 0,
- "inline function %qD given attribute noinline", decl);
+ "inline function %qD given attribute %qs", decl, "noinline");
if (TYPE_P (context) && COMPLETE_TYPE_P (complete_type (context)))
{
@@ -5703,7 +5703,7 @@ check_for_uninitialized_const_var (tree decl, bool constexpr_context_p,
{
if (complain & tf_error)
show_notes = permerror (DECL_SOURCE_LOCATION (decl),
- "uninitialized const %qD", decl);
+ "uninitialized %<const %D%>", decl);
}
else
{
@@ -9148,7 +9148,7 @@ grokfndecl (tree ctype,
else if (long_double_p)
{
if (cpp_interpret_float_suffix (parse_in, suffix, strlen (suffix)))
- warning_at (location, 0, "floating point suffix %qs"
+ warning_at (location, 0, "floating-point suffix %qs"
" shadowed by implementation", suffix);
}
/* 17.6.3.3.5 */
@@ -10184,7 +10184,7 @@ check_special_function_return_type (special_function_kind sfk,
for (int i = 0; i < ds_last; ++i)
if (i != ds_explicit && locations[i])
error_at (locations[i],
- "decl-specifier in declaration of deduction guide");
+ "%<decl-specifier%> in declaration of deduction guide");
break;
default:
@@ -14747,7 +14747,7 @@ finish_enum_value_list (tree enumtype)
if (TYPE_PRECISION (enumtype))
{
if (precision > TYPE_PRECISION (enumtype))
- error ("specified mode too small for enumeral values");
+ error ("specified mode too small for enumerated values");
else
{
use_short_enum = true;
@@ -15276,7 +15276,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
if (DECL_DECLARED_INLINE_P (decl1)
&& lookup_attribute ("noinline", attrs))
warning_at (DECL_SOURCE_LOCATION (decl1), 0,
- "inline function %qD given attribute noinline", decl1);
+ "inline function %qD given attribute %qs", decl1, "noinline");
/* Handle gnu_inline attribute. */
if (GNU_INLINE_P (decl1))
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 9441144..308b2d4a 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -14075,7 +14075,7 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
if (found_decl_spec
&& (flags & CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR)
&& token->keyword != RID_CONSTEXPR)
- error ("decl-specifier invalid in condition");
+ error ("%<decl-specifier%> invalid in condition");
if (found_decl_spec
&& (flags & CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index b9fa6f1..eab8003 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -4887,7 +4887,7 @@ cp_build_binary_op (const op_location_t &location,
&& c_inhibit_evaluation_warnings == 0
&& (FLOAT_TYPE_P (type0) || FLOAT_TYPE_P (type1)))
warning (OPT_Wfloat_equal,
- "comparing floating point with %<==%> or %<!=%> is unsafe");
+ "comparing floating-point with %<==%> or %<!=%> is unsafe");
if (complain & tf_warning)
{
tree stripped_orig_op0 = tree_strip_any_location_wrapper (orig_op0);
@@ -5288,7 +5288,7 @@ cp_build_binary_op (const op_location_t &location,
if (code0 != REAL_TYPE || code1 != REAL_TYPE)
{
if (complain & tf_error)
- error ("unordered comparison on non-floating point argument");
+ error ("unordered comparison on non-floating-point argument");
return error_mark_node;
}
common = 1;
@@ -7239,8 +7239,8 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p,
conversion does not cast away constness (_expr.const.cast_), and
the following additional rules for specific cases: */
/* For reference, the conversions not excluded are: integral
- promotions, floating point promotion, integral conversions,
- floating point conversions, floating-integral conversions,
+ promotions, floating-point promotion, integral conversions,
+ floating-point conversions, floating-integral conversions,
pointer conversions, and pointer to member conversions. */
/* DR 128