aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@codesourcery.com>2000-08-23 09:31:12 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2000-08-23 09:31:12 +0000
commita64e73290a52f1936e1fd102c2f58fd92580d095 (patch)
tree8890923727ee9f077169281ebb46f79bcc1e2e0f
parente7977565ad30a83db85d89a2fdbee1f19605a181 (diff)
downloadgcc-a64e73290a52f1936e1fd102c2f58fd92580d095.zip
gcc-a64e73290a52f1936e1fd102c2f58fd92580d095.tar.gz
gcc-a64e73290a52f1936e1fd102c2f58fd92580d095.tar.bz2
error.c (cp_print_error_function): Don't use embedded '\n' in output_printf.
* error.c (cp_print_error_function): Don't use embedded '\n' in output_printf. From-SVN: r35906
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/error.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8ddd8a0..174263e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
+ * error.c (cp_print_error_function): Don't use embedded '\n' in
+ output_printf.
+
+2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
+
* decl.c (init_decl_processing): Remove bogus initialization.
* error.c (lang_print_error_function): Restore here.
(init_error): Initialize print_error_function.
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 012bbcf..4329de5 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2486,14 +2486,12 @@ cp_print_error_function (buffer, dc)
output_set_prefix (buffer, prefix);
if (current_function_decl == NULL)
- {
- output_add_string (buffer, "At global scope:");
- output_add_newline (buffer);
- }
+ output_add_string (buffer, "At global scope:");
else
output_printf
- (buffer, "In %s `%s':\n", function_category (current_function_decl),
+ (buffer, "In %s `%s':", function_category (current_function_decl),
(*decl_printable_name) (current_function_decl, 2));
+ output_add_newline (buffer);
record_last_error_function ();
output_destroy_prefix (buffer);