Some testcases specifically test for negative line numbers. Those tests with
bare line numbers may be parsed incorrectly by Tcl/Expect as invalid options.
This patch encloses the negative numbers in braces so that they are
recognized as an optional parameter.
gcc/testsuite/ChangeLog
2020-07-02 David Edelsohn <dje.gcc@gmail.com>
* gcc.dg/fixits-pr84852-1.c: Enclose negative line number in braces.
* gcc.dg/fixits-pr84852-2.c: Same.
* gcc.dg/pr89410-1.c: Same.
* gcc.dg/pr89410-2.c: Same.
int foo (void) { return strlen(""); }
-/* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */
+/* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } { -812156810 } } */
/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } 1 } */
#if 0
{ dg-begin-multiline-output "" }
int foo (void) { return strlen(""); }
-/* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */
+/* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } { -812156810 } } */
/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } 1 } */
#if 0
{ dg-begin-multiline-output "" }
/* This is 0xffffffff. */
#line 4294967295
#warning msg
- /* { dg-warning "msg" "" { target *-*-* } -1 } */
+ /* { dg-warning "msg" "" { target *-*-* } { -1 } } */
}
#line 9223372036854775807
^~~~~~~~~~~~~~~~~~~
{ dg-end-multiline-output "" } */
- /* { dg-warning "msg" "" { target *-*-* } -1 } */
+ /* { dg-warning "msg" "" { target *-*-* } { -1 } } */
}