]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR preprocessor/21250 (line number 0 for <built-in> causes GAS to complain)
authorPer Bothner <per@bothner.com>
Fri, 14 Oct 2005 14:56:45 +0000 (07:56 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 14 Oct 2005 14:56:45 +0000 (07:56 -0700)
PR preprocessor/21250
* c-ppoutput.c (print_line): Print internal line 0 as 1.

From-SVN: r105408

gcc/ChangeLog
gcc/c-ppoutput.c

index b1746e5bdfd0127aa1e34aaf5ea1b98b2f21e6fd..28fae441b653ff8256ff1154ee4464245267fc30 100644 (file)
@@ -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
index 692ea7a4d756dd7d7c5901a4cfcea58f9e3226f2..ddc12ceed85ac15a04de7b9ecdf5aa36822727ee 100644 (file)
@@ -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)