This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 24/03/17 18:13, Mike Stump wrote:
On Mar 24, 2017, at 5:58 AM, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:- { /* { dg-warning "statement may fall through" "" { target c } 23 } */ - int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 24 } */ + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ + int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */Any reason to not use relative line numbers? See testsuite/gcc.dg/dg-test-1.c for a template for how to do it. I think they should work and be better. Indeed, all line numbers should be relative, generally speaking.
FYI, I've written a script to convert all tests to relative line numbers. See PR80221 - "Contrib script to rewrite testcase from absolute to relative line numbers" ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221 ).
Thanks, - Tom
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |