summaryrefslogtreecommitdiff
path: root/gcc/c-ppoutput.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-14 14:56:45 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-14 14:56:45 +0000
commitdc0a05d1230076ec8ae93fe4738d2e1d6cae6571 (patch)
treecc43e2fadefb351a42573124644928a12fe91b8e /gcc/c-ppoutput.c
parent96722196333e60239eda33ca3fe3597405bfcfe0 (diff)
downloadgcc-dc0a05d1230076ec8ae93fe4738d2e1d6cae6571.tar.gz
PR preprocessor/21250
* c-ppoutput.c (print_line): Print internal line 0 as 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105408 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-ppoutput.c')
-rw-r--r--gcc/c-ppoutput.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 692ea7a4d75..ddc12ceed85 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -256,7 +256,8 @@ print_line (source_location src_loc, const char *special_flags)
p = cpp_quote_string (to_file_quoted,
(unsigned char *) map->to_file, to_file_len);
*p = '\0';
- fprintf (print.outf, "# %u \"%s\"%s", print.src_line,
+ fprintf (print.outf, "# %u \"%s\"%s",
+ print.src_line == 0 ? 1 : print.src_line,
to_file_quoted, special_flags);
if (map->sysp == 2)