aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2005-10-14 07:56:45 -0700
committerPer Bothner <bothner@gcc.gnu.org>2005-10-14 07:56:45 -0700
commitd2c979efb7a2638849609b7a4ce48ea9f12dc9e8 (patch)
treecc43e2fadefb351a42573124644928a12fe91b8e /gcc
parentc0e22534e4977ab263f6ae40b70d8bd76334665c (diff)
downloadgcc-d2c979efb7a2638849609b7a4ce48ea9f12dc9e8.zip
gcc-d2c979efb7a2638849609b7a4ce48ea9f12dc9e8.tar.gz
gcc-d2c979efb7a2638849609b7a4ce48ea9f12dc9e8.tar.bz2
re PR preprocessor/21250 (line number 0 for <built-in> causes GAS to complain)
PR preprocessor/21250 * c-ppoutput.c (print_line): Print internal line 0 as 1. From-SVN: r105408
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-ppoutput.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b1746e5..28fae44 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-14 Per Bothner <per@bothner.com>
+
+ PR preprocessor/21250
+ * c-ppoutput.c (print_line): Print internal line 0 as 1.
+
2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/22551
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 692ea7a..ddc12ce 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)