aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog19
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/decl2.c2
-rw-r--r--gcc/cp/init.c4
-rw-r--r--gcc/cp/method.c8
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/parser.c4
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/repo.c2
10 files changed, 37 insertions, 18 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 04f95bb..e5fa280 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-10 Joseph Myers <joseph@codesourcery.com>
+
+ * cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
+ * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
+ Use %' in diagnostics.
+ * decl2.c (check_classfn): Use %' in diagnostic.
+ * init.c (build_java_class_ref): Use %' in diagnostic.
+ (build_delete): Remove trailing '.' from diagnostic.
+ * method.c (do_build_copy_assign, walk_field_subobs): Use %' in
+ diagnostics.
+ * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
+ * parser.c (cp_parser_exception_specification_opt): Remove
+ trailing '.' from diagnostic.
+ (cp_parser_objc_interstitial_code): Use %qs for quoting in
+ diagnostic.
+ * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
+ diagnostic.
+ * repo.c (reopen_repo_file_for_write): Use %' in diagnostic.
+
2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
PR c++/46065
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 2f7823f..b10e558 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -88,7 +88,7 @@ cp_convert_to_pointer (tree type, tree expr)
intype = complete_type (intype);
if (!COMPLETE_TYPE_P (intype))
{
- error ("can't convert from incomplete type %qT to %qT",
+ error ("can%'t convert from incomplete type %qT to %qT",
intype, type);
return error_mark_node;
}
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 93af4b4..7891c1e 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4691,7 +4691,7 @@ layout_var_decl (tree decl)
/* An automatic variable with an incomplete type: that is an error.
Don't talk about array types here, since we took care of that
message in grokdeclarator. */
- error ("storage size of %qD isn't known", decl);
+ error ("storage size of %qD isn%'t known", decl);
TREE_TYPE (decl) = error_mark_node;
}
#if 0
@@ -4714,7 +4714,7 @@ layout_var_decl (tree decl)
constant_expression_warning (DECL_SIZE (decl));
else
{
- error ("storage size of %qD isn't constant", decl);
+ error ("storage size of %qD isn%'t constant", decl);
TREE_TYPE (decl) = error_mark_node;
}
}
@@ -4761,7 +4761,7 @@ maybe_commonize_var (tree decl)
DECL_COMMON (decl) = 0;
warning_at (input_location, 0,
"sorry: semantics of inline function static "
- "data %q+#D are wrong (you'll wind up "
+ "data %q+#D are wrong (you%'ll wind up "
"with multiple copies)", decl);
warning_at (DECL_SOURCE_LOCATION (decl), 0,
" you can work around this by removing "
@@ -8790,7 +8790,7 @@ grokdeclarator (const cp_declarator *declarator,
else if (friendp)
{
if (initialized)
- error ("can't initialize friend function %qs", name);
+ error ("can%'t initialize friend function %qs", name);
if (virtualp)
{
/* Cannot be both friend and virtual. */
@@ -8800,7 +8800,7 @@ grokdeclarator (const cp_declarator *declarator,
if (decl_context == NORMAL)
error ("friend declaration not in class definition");
if (current_function_decl && funcdef_flag)
- error ("can't define friend function %qs in a local "
+ error ("can%'t define friend function %qs in a local "
"class definition",
name);
}
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index e00549e..dfb7e45 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -624,7 +624,7 @@ check_classfn (tree ctype, tree function, tree template_parms)
&& !comp_template_parms (template_parms,
DECL_TEMPLATE_PARMS (function)))
{
- error ("template parameter lists provided don't match the "
+ error ("template parameter lists provided don%'t match the "
"template parameters of %qD", function);
return error_mark_node;
}
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 0ecd61d..00b5d9b 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -2629,7 +2629,7 @@ build_java_class_ref (tree type)
}
if (!field)
{
- error ("can't find %<class$%> in %qT", type);
+ error ("can%'t find %<class$%> in %qT", type);
return error_mark_node;
}
}
@@ -3307,7 +3307,7 @@ build_delete (tree type, tree addr, special_function_kind auto_delete,
cxx_incomplete_type_diagnostic (addr, type, DK_WARNING);
inform (input_location, "neither the destructor nor the class-specific "
"operator delete will be called, even if they are "
- "declared when the class is defined.");
+ "declared when the class is defined");
}
complete_p = false;
}
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index d0ed0f4..27346d0 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -645,13 +645,13 @@ do_build_copy_assign (tree fndecl)
if (CP_TYPE_CONST_P (expr_type))
{
- error ("non-static const member %q#D, can't use default "
+ error ("non-static const member %q#D, can%'t use default "
"assignment operator", field);
continue;
}
else if (TREE_CODE (expr_type) == REFERENCE_TYPE)
{
- error ("non-static reference member %q#D, can't use "
+ error ("non-static reference member %q#D, can%'t use "
"default assignment operator", field);
continue;
}
@@ -976,13 +976,13 @@ walk_field_subobs (tree fields, tree fnname, special_function_kind sfk,
if (CP_TYPE_CONST_P (mem_type) && !CLASS_TYPE_P (mem_type))
{
if (msg)
- error ("non-static const member %q#D, can't use default "
+ error ("non-static const member %q#D, can%'t use default "
"assignment operator", field);
}
else if (TREE_CODE (mem_type) == REFERENCE_TYPE)
{
if (msg)
- error ("non-static reference member %q#D, can't use "
+ error ("non-static reference member %q#D, can%'t use "
"default assignment operator", field);
}
else
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 0a93da8..5fe60f9 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -992,7 +992,7 @@ pushdecl_maybe_friend (tree x, bool is_friend)
/* OK */;
else
{
- warning (0, "extern declaration of %q#D doesn't match", x);
+ warning (0, "extern declaration of %q#D doesn%'t match", x);
warning (0, "global declaration %q+#D", oldglobal);
}
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 4897941..906b0c3 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -18212,7 +18212,7 @@ cp_parser_exception_specification_opt (cp_parser* parser)
/* Enable this once a lot of code has transitioned to noexcept? */
if (cxx_dialect == cxx0x && !in_system_header)
warning (OPT_Wdeprecated, "dynamic exception specifications are "
- "deprecated in C++0x; use %<noexcept%> instead.");
+ "deprecated in C++0x; use %<noexcept%> instead");
#endif
/* Consume the `throw'. */
@@ -21972,7 +21972,7 @@ cp_parser_objc_interstitial_code (cp_parser* parser)
else if (token->type == CPP_OPEN_BRACE || token->type == CPP_CLOSE_BRACE)
{
cp_lexer_consume_token (parser->lexer);
- error ("stray `%s' between Objective-C++ methods",
+ error ("stray %qs between Objective-C++ methods",
token->type == CPP_OPEN_BRACE ? "{" : "}");
}
/* Finally, try to parse a block-declaration, or a function-definition. */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ed04b2b..7a06038 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5234,7 +5234,7 @@ check_valid_ptrmem_cst_expr (tree type, tree expr,
{
error ("%qE is not a valid template argument for type %qT",
expr, type);
- error ("it must be a pointer-to-member of the form `&X::Y'");
+ error ("it must be a pointer-to-member of the form %<&X::Y%>");
}
return false;
}
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 357dcd9..16a192e 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -224,7 +224,7 @@ reopen_repo_file_for_write (void)
if (repo_file == 0)
{
- error ("can't create repository information file %qs", repo_name);
+ error ("can%'t create repository information file %qs", repo_name);
flag_use_repository = 0;
}