]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
(s_app_line): Accept a line number of 0 for compatibility with gcc's output
authorNick Clifton <nickc@redhat.com>
Sun, 7 Aug 2005 10:34:52 +0000 (10:34 +0000)
committerNick Clifton <nickc@redhat.com>
Sun, 7 Aug 2005 10:34:52 +0000 (10:34 +0000)
for assembler-with-cpp files.

gas/ChangeLog
gas/read.c

index 789e03576d5b1802820d8c9978a7642d552a675f..0ac1757369238086bf48bbcb6da442eb5c78e4b9 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-07  Nick Clifton  <nickc@redhat.com>
+
+       * read.c (s_app_line): Accept a line number of 0 for compatibility
+       with gcc's output for assembler-with-cpp files.
+
 2005-08-05  Paul Brook  <paul@codesourcery.com>
 
        * config/tc-arm.c (current_it_mask, current_cc): New variables.
index 7b667077aa7ea9f1e799a8bc229ae2c1fa417de5..f6bc66fa615ee94741213e836a00f1d2ef9bedb9 100644 (file)
@@ -1698,9 +1698,17 @@ s_app_line (int ignore ATTRIBUTE_UNUSED)
 
   /* The given number is that of the next line.  */
   l = get_absolute_expression () - 1;
-  if (l < 0)
+
+  if (l < -1)
     /* Some of the back ends can't deal with non-positive line numbers.
-       Besides, it's silly.  */
+       Besides, it's silly.  GCC however will generate a line number of
+       zero when it is pre-processing builtins for assembler-with-cpp files:
+
+          # 0 "<built-in>"
+
+       We do not want to barf on this, especially since such files are used
+       in the GCC and GDB testsuites.  So we check for negative line numbers
+       rather than non-positive line numbers.  */
     as_warn (_("line numbers must be positive; line number %d rejected"),
             l + 1);
   else