https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98708
--- Comment #12 from Mark Wielaard <mark at gcc dot gnu.org> --- On the binutils gas side it could be as simple as turning the error into a warning: diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index a428370ecca..a216bfd6b28 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -1044,7 +1044,7 @@ dwarf2_directive_filename (void) if ((offsetT) num < 1 && DWARF2_LINE_VERSION < 5) { - as_bad (_("file number less than one")); + as_warn (_("file number less than one, ignored")); ignore_rest_of_line (); return NULL; } @@ -1143,7 +1143,8 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED) { if (filenum != 0 || DWARF2_LINE_VERSION < 5) { - as_bad (_("file number less than one")); + as_warn (_("file number less than one, ignored")); + ignore_rest_of_line (); return; } } diff --git a/gas/testsuite/gas/lns/lns-diag-1.l b/gas/testsuite/gas/lns/lns-diag-1.l index 1256e85cfcb..d8aa84d9d1a 100644 --- a/gas/testsuite/gas/lns/lns-diag-1.l +++ b/gas/testsuite/gas/lns/lns-diag-1.l @@ -1,5 +1,5 @@ .*: Assembler messages: -.*:2: Error: file number less than one +.*:2: Warning: file number less than one, ignored .*:3: Error: missing string .*:4: Error: file table slot 1 is already occupied.* .*:8: Error: unassigned file number 3 @@ -9,7 +9,7 @@ .*:19: Error: bad or irreducible absolute expression .*:23: Error: isa number less than zero .*:26: Error: bad or irreducible absolute expression -.*:26: Error: file number less than one +.*:26: Warning: file number less than one, ignored .*:27: Error: bad or irreducible absolute expression .*:28: Error: unknown .loc sub-directive `frobnitz' .*:29: Error: unknown .loc sub-directive `frobnitz'