[Bug testsuite/80552] Make consecutive relative line numbers more maintainable

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 28 08:40:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80552

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
FTR, a way to deal with the consecutive relative line numbers pattern using
dg-line would be:
...
 foobar; /* { dg-line foobar_line } */
  /* { dg-warning "warning for foobar" foobar_line }
     { dg-warning "another warning for foobar" foobar_line }
     { dg-error "error for foobar" foobar_line } */
...
but that requires you to come up with a variable name for the line. It's better
to have a solution that can be applied mechanically.


More information about the Gcc-bugs mailing list