On 04/26/2017 01:57 PM, Jakub Jelinek wrote:
On Wed, Apr 26, 2017 at 01:48:03PM +0200, Tom de Vries wrote:
[ reposting with patch removed, was too big for gcc-patches@ ]
I see in various tests you've ended up with ... { target ... } . }
I think it would be better to just use ... { target ... } }
in that case, . is the default, and if target is *-*-*, also remove the {
target ... }.
I've written sed commands for both simplifications, untested patches
attached.
[ I suppose we could drop an empty comment as the last argument as well.
{ ... "" }. ]
Are there any spots where the relative line number is with too big bias
(say .+10 or .-10 and more)?
In the original patch, which rewrote all absolute line numbers, yes, it
generated -62 ( and Mike commented on that here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221#c6 ).
In the committed patch, no. The greatest relative line number magnitude
was 6. The script was limited to rewrite only dg directives with -1 ..
+1 relative line number, and adjacent directives referring to the same
line.
Thanks,
- Tom
I guess those should be decided case by case
whether we want relative, absolute or saved line numbers. If the
diagnostic is within the same function or code block as the stuff it is
relative to, relative is fine, but if e.g. the messages are just at the end
of file and there are unrelated functions in between, it is not a good idea
to use relative.
Jakub
Remove . relative line number from dg directives
find $(find -type d -name testsuite) -type f \
| xargs sed -ri 's#(dg-(error|warning|message|bogus).*) \. #\1 #'
---
.../c-c++-common/Wimplicit-fallthrough-6.c | 16 +++++-----
.../c-c++-common/Wimplicit-fallthrough-7.c | 8 ++---
gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c | 2 +-
.../c-c++-common/cilk-plus/CK/no_args_error.c | 2 +-
gcc/testsuite/c-c++-common/pr20000.c | 2 +-
gcc/testsuite/c-c++-common/pr49706.c | 6 ++--
gcc/testsuite/g++.dg/ext/utf16-4.C | 2 +-
gcc/testsuite/g++.dg/parse/error2.C | 2 +-
gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C | 4 +--
gcc/testsuite/g++.dg/warn/Wtype-limits.C | 4 +--
gcc/testsuite/g++.dg/warn/overflow-warn-1.C | 2 +-
gcc/testsuite/g++.dg/warn/overflow-warn-3.C | 2 +-
gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c | 2 +-
gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c | 2 +-
gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c | 4 +--
gcc/testsuite/gcc.dg/Wtype-limits.c | 4 +--
gcc/testsuite/gcc.dg/cpp/19990413-1.c | 2 +-
gcc/testsuite/gcc.dg/dg-test-1.c | 4 +--
gcc/testsuite/gcc.dg/empty-source-2.c | 2 +-
gcc/testsuite/gcc.dg/empty-source-3.c | 2 +-
gcc/testsuite/gcc.dg/label-decl-2.c | 2 +-
gcc/testsuite/gcc.dg/m-un-2.c | 2 +-
.../gcc.dg/tree-ssa/builtin-sprintf-warn-1.c | 36 +++++++++++-----------
.../gcc.dg/tree-ssa/builtin-sprintf-warn-2.c | 2 +-
gcc/testsuite/gcc.dg/uninit-pr19430-O0.c | 2 +-
gcc/testsuite/gcc.dg/uninit-pr19430.c | 2 +-
gcc/testsuite/gcc.dg/uninit-pr20644-O0.c | 4 +--
gcc/testsuite/gcc.dg/utf16-4.c | 2 +-
gcc/testsuite/gfortran.dg/pr70006.f90 | 8 ++---
gcc/testsuite/obj-c++.dg/fsf-package-0.m | 2 +-
30 files changed, 68 insertions(+), 68 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c
index 5b6ac30..32d5feb 100644
--- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c
+++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c
@@ -117,11 +117,11 @@ L1:
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } . } */
+ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0;
bar (j);
if (j == 8)
- return; /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ return; /* { dg-warning "statement may fall through" "" { target c++ } } */
}
case 2:
bar (99);
@@ -145,13 +145,13 @@ L1:
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } . } */
+ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0;
bar (j);
if (j == 8)
bar (1);
else
- return; /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ return; /* { dg-warning "statement may fall through" "" { target c++ } } */
}
case 2:
bar (99);
@@ -175,13 +175,13 @@ L1:
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } . } */
+ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0;
bar (j);
if (j == 8)
bar (1);
else
- bar (2); /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ bar (2); /* { dg-warning "statement may fall through" "" { target c++ } } */
}
case 2:
bar (99);
@@ -279,9 +279,9 @@ L1:
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } . } */
+ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 9;
- switch (j); /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ switch (j); /* { dg-warning "statement may fall through" "" { target c++ } } */
}
case 2:
bar (99);
diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c
index df8ae35..24a573b 100644
--- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c
+++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c
@@ -21,8 +21,8 @@ f (int i)
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } . } */
- int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ { /* { dg-warning "statement may fall through" "" { target c } } */
+ int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } } */
}
case 2:
bar (99);
@@ -31,8 +31,8 @@ f (int i)
switch (i)
{
case 1:
- for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } . } */
- map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } . } */
+ for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } } */
+ map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } } */
case 2:
bar (99);
}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
index 5f1abd9..205671a 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
@@ -4,6 +4,6 @@
void f (int * int *a) /* { dg-error "expected" } */
{
- a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } . } */
+ a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } } */
a[0:64] = 0;
}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c
index 990f206..a2f20d2 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c
@@ -5,7 +5,7 @@ int spawn_1 ();
typedef int(*func) (int);
void check () {
- func var = spawn_1; /* { dg-error "invalid conversion from" "" { target c++ } . } */
+ func var = spawn_1; /* { dg-error "invalid conversion from" "" { target c++ } } */
_Cilk_spawn var (); /* { dg-error "too few arguments to function" } */
}
diff --git a/gcc/testsuite/c-c++-common/pr20000.c b/gcc/testsuite/c-c++-common/pr20000.c
index 6325392..726cb0d 100644
--- a/gcc/testsuite/c-c++-common/pr20000.c
+++ b/gcc/testsuite/c-c++-common/pr20000.c
@@ -24,7 +24,7 @@ int vg(void);
int vg2(void); /* { dg-bogus ".noreturn. function returns non-void value" } */
int vg(void) {
- return 1; /* { dg-warning "function declared 'noreturn' has a 'return' statement" "has return" { target c } . } */
+ return 1; /* { dg-warning "function declared 'noreturn' has a 'return' statement" "has return" { target c } } */
} /* { dg-warning "'noreturn' function does return" "does return" { target c } .-1 } */
int vg2(void) {
diff --git a/gcc/testsuite/c-c++-common/pr49706.c b/gcc/testsuite/c-c++-common/pr49706.c
index 027d8bf..203fc36 100644
--- a/gcc/testsuite/c-c++-common/pr49706.c
+++ b/gcc/testsuite/c-c++-common/pr49706.c
@@ -12,13 +12,13 @@ extern bool foo_b (void);
extern int foo_i (void);
#ifdef __cplusplus
-template <class T, class U> bool tfn1(T t, U u) { return (!t == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
+template <class T, class U> bool tfn1(T t, U u) { return (!t == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } } */
template <class T, class U> bool tfn2(T t, U u) { return ((!t) == u); }
-template <class T, class U> bool tfn3(T t, U u) { return (!g(t) == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
+template <class T, class U> bool tfn3(T t, U u) { return (!g(t) == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } } */
template <class T, class U> bool tfn4(T t, U u) { return ((!g(t)) == u); }
template <class T, class U> bool tfn5(T t, U u) { return (!!t == u); } /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
template <class T, class U> bool tfn6(T t, U u) { return (!!g(t) == u); } /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
-template <int N> bool tfn7(int i1, int i2) { return (!i1 == i2); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
+template <int N> bool tfn7(int i1, int i2) { return (!i1 == i2); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } } */
#endif
void
diff --git a/gcc/testsuite/g++.dg/ext/utf16-4.C b/gcc/testsuite/g++.dg/ext/utf16-4.C
index 8ba88af..e8d6531 100644
--- a/gcc/testsuite/g++.dg/ext/utf16-4.C
+++ b/gcc/testsuite/g++.dg/ext/utf16-4.C
@@ -13,6 +13,6 @@ const static char16_t c5 = U'\u2029';
const static char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
const static char16_t c7 = L'a';
const static char16_t c8 = L'\u2029';
-const static char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } . } */
+const static char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } } */
/* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {}
diff --git a/gcc/testsuite/g++.dg/parse/error2.C b/gcc/testsuite/g++.dg/parse/error2.C
index 0675730..cb8f413 100644
--- a/gcc/testsuite/g++.dg/parse/error2.C
+++ b/gcc/testsuite/g++.dg/parse/error2.C
@@ -8,7 +8,7 @@ int func(double);
template <int>
struct Foo {};
-Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } . }
+Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } }
// { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } .-1 }
// { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } .-2 }
// { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } .-3 }
diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
index 6470d4f..91b5c1b 100644
--- a/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
+++ b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
@@ -13,7 +13,7 @@ void a (unsigned char x)
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return;
if (255 >= (unsigned char) 1)
return;
@@ -58,7 +58,7 @@ void e (unsigned long long x)
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return 1;
else
return 0;
diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits.C b/gcc/testsuite/g++.dg/warn/Wtype-limits.C
index f585e97..c345eff 100644
--- a/gcc/testsuite/g++.dg/warn/Wtype-limits.C
+++ b/gcc/testsuite/g++.dg/warn/Wtype-limits.C
@@ -13,7 +13,7 @@ void a (unsigned char x)
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return;
if (255 >= (unsigned char) 1)
return;
@@ -58,7 +58,7 @@ void e (unsigned long long x)
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return 1;
else
return 0;
diff --git a/gcc/testsuite/g++.dg/warn/overflow-warn-1.C b/gcc/testsuite/g++.dg/warn/overflow-warn-1.C
index b29eec34..c327cc0 100644
--- a/gcc/testsuite/g++.dg/warn/overflow-warn-1.C
+++ b/gcc/testsuite/g++.dg/warn/overflow-warn-1.C
@@ -11,7 +11,7 @@ enum e {
E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example
in the standard). */
- E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } . } */
+ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } } */
E3 = 1 / 0, /* { dg-warning "division by zero" } */
/* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
diff --git a/gcc/testsuite/g++.dg/warn/overflow-warn-3.C b/gcc/testsuite/g++.dg/warn/overflow-warn-3.C
index a43ea5c..ff6864d 100644
--- a/gcc/testsuite/g++.dg/warn/overflow-warn-3.C
+++ b/gcc/testsuite/g++.dg/warn/overflow-warn-3.C
@@ -11,7 +11,7 @@ enum e {
E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example
in the standard). */
- E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } . } */
+ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } } */
E3 = 1 / 0, /* { dg-warning "division by zero" } */
/* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
diff --git a/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c b/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
index 66cc3a5..d29df30 100644
--- a/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
+++ b/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
@@ -2,7 +2,7 @@
/* { dg-options "-Wall" } */
-void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } . } */
+void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } } */
void bar(long* lp) {
diff --git a/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c b/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
index 7b1eef2..aebfbdd 100644
--- a/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
+++ b/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
@@ -2,7 +2,7 @@
/* { dg-options "-pedantic" } */
-void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } . } */
+void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } } */
void bar(long* lp) {
foo(lp); /* { dg-warning "differ in signedness" } */
diff --git a/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c
index bf08734..e5e7f94 100644
--- a/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c
+++ b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c
@@ -13,7 +13,7 @@ void a (unsigned char x)
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return;
if (255 >= (unsigned char) 1)
return;
@@ -61,7 +61,7 @@ void e (unsigned long long x)
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return 1;
else
return 0;
diff --git a/gcc/testsuite/gcc.dg/Wtype-limits.c b/gcc/testsuite/gcc.dg/Wtype-limits.c
index c137385..2d6f991 100644
--- a/gcc/testsuite/gcc.dg/Wtype-limits.c
+++ b/gcc/testsuite/gcc.dg/Wtype-limits.c
@@ -13,7 +13,7 @@ void a (unsigned char x)
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return;
if (255 >= (unsigned char) 1)
return;
@@ -61,7 +61,7 @@ void e (unsigned long long x)
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } } */
return 1;
else
return 0;
diff --git a/gcc/testsuite/gcc.dg/cpp/19990413-1.c b/gcc/testsuite/gcc.dg/cpp/19990413-1.c
index 96a3d70..bcb7e52 100644
--- a/gcc/testsuite/gcc.dg/cpp/19990413-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/19990413-1.c
@@ -9,5 +9,5 @@ func(void)
{
FOO(i
= 4)
- else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } . } */
+ else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } } */
}
diff --git a/gcc/testsuite/gcc.dg/dg-test-1.c b/gcc/testsuite/gcc.dg/dg-test-1.c
index c67f93b..b4e22e2 100644
--- a/gcc/testsuite/gcc.dg/dg-test-1.c
+++ b/gcc/testsuite/gcc.dg/dg-test-1.c
@@ -5,7 +5,7 @@
void
foo (void)
{ /* { dg-error "'a' undeclared" "err1" { target *-*-* } .+1 } */
- int z = a + b + c + d;/* { dg-error "'b' undeclared" "err2" { target *-*-* } . } */
+ int z = a + b + c + d;/* { dg-error "'b' undeclared" "err2" { target *-*-* } } */
} /* { dg-error "'c' undeclared" "err3" { target *-*-* } .-1 } */
@@ -13,7 +13,7 @@ foo (void)
/* { dg-warning "unused parameter 'e'" "warn1" { target *-*-* } .+3 } */
void /* { dg-warning "unused parameter 'f'" "warn2" { target *-*-* } .+1 } */
-bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" { target *-*-* } . } */
+bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" { target *-*-* } } */
{ /* { dg-warning "unused parameter 'h'" "warn4" { target *-*-* } .-1 } */
}
diff --git a/gcc/testsuite/gcc.dg/empty-source-2.c b/gcc/testsuite/gcc.dg/empty-source-2.c
index 7261fda..e0f1e20 100644
--- a/gcc/testsuite/gcc.dg/empty-source-2.c
+++ b/gcc/testsuite/gcc.dg/empty-source-2.c
@@ -3,4 +3,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
-/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } . } */
+/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/empty-source-3.c b/gcc/testsuite/gcc.dg/empty-source-3.c
index 8a24860..a1e1d2c 100644
--- a/gcc/testsuite/gcc.dg/empty-source-3.c
+++ b/gcc/testsuite/gcc.dg/empty-source-3.c
@@ -4,4 +4,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
-/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } . } */
+/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/label-decl-2.c b/gcc/testsuite/gcc.dg/label-decl-2.c
index 2ba1f63..2ad4272 100644
--- a/gcc/testsuite/gcc.dg/label-decl-2.c
+++ b/gcc/testsuite/gcc.dg/label-decl-2.c
@@ -8,7 +8,7 @@ typedef int b;
void
f (void)
{
- __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } . } */
+ __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } } */
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0;
diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c
index ffe68cd..345b9ff 100644
--- a/gcc/testsuite/gcc.dg/m-un-2.c
+++ b/gcc/testsuite/gcc.dg/m-un-2.c
@@ -15,7 +15,7 @@ struct vtable {
struct vtable mtable = {
malloc,
free
-}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } . } */
+}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } } */
/* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */
/* With designated initializers, we assume you meant to leave out the
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
index b4a9a6e..a8dca4b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
@@ -764,7 +764,7 @@ void test_sprintf_chk_j_const (void)
T (1, "%+.0ju", I (0)); /* { dg-warning ".\\+. flag used" } */
T (1, "%-.0jd", I (0));
T (1, "% .0jd", I (0)); /* { dg-warning "nul past the end" } */
- T (1, "% .0ju", I (0)); /* { dg-warning ". . flag used" } */
+ T (1, "% .0ju", I (0)); /* { dg-warning ". flag used" } */
T (1, "%0.0jd", I (0)); /* { dg-warning ".0. flag ignored with precision" } */
T (1, "%00.0jd", I (0)); /* { dg-warning "repeated .0. flag in format" } */
/* { dg-warning ".0. flag ignored with precision" "" { target *-*-* } .-1 } */
@@ -840,7 +840,7 @@ void test_sprintf_chk_l_const (void)
T (1, "%+.0lu", 0L); /* { dg-warning ".\\+. flag used" } */
T (1, "%-.0ld", 0L);
T (1, "% .0ld", 0L); /* { dg-warning "nul past the end" } */
- T (1, "% .0lu", 0L); /* { dg-warning ". . flag used" } */
+ T (1, "% .0lu", 0L); /* { dg-warning ". flag used" } */
T (1, "%0.0ld", 0L); /* { dg-warning ".0. flag ignored with precision" } */
T (1, "%00.0ld", 0L); /* { dg-warning "repeated .0. flag in format" } */
/* { dg-warning ".0. flag ignored with precision" "" { target *-*-* } .-1 } */
@@ -1116,7 +1116,7 @@ void test_sprintf_chk_hh_nonconst (int w, int p, int a)
{
T (-1, "%hhd", a);
- T (0, "%hhd", a); /* { dg-warning ".%hhd. directive writing between 1 and . bytes into a region of size 0" } */
+ T (0, "%hhd", a); /* { dg-warning ".%hhd. directive writing between 1 and bytes into a region of size 0" } */
T (0, "%hhi", var0); /* { dg-warning "into a region" } */
T (0, "%hhi", a); /* { dg-warning "into a region" } */
T (0, "%hhu", a); /* { dg-warning "into a region" } */
@@ -1147,9 +1147,9 @@ void test_sprintf_chk_hh_nonconst (int w, int p, int a)
T (2, "% hhd", var0); /* { dg-warning "nul past the end" } */
T (2, "% hhd", var10); /* { dg-warning "nul past the end" } */
T (2, "% hhi", a); /* { dg-warning "nul past the end" } */
- T (2, "% hho", a); /* { dg-warning ". . flag used with .%o." } */
- T (2, "% hhu", a); /* { dg-warning ". . flag used with .%u." } */
- T (2, "% hhx", a); /* { dg-warning ". . flag used with .%x." } */
+ T (2, "% hho", a); /* { dg-warning ". flag used with .%o." } */
+ T (2, "% hhu", a); /* { dg-warning ". flag used with .%u." } */
+ T (2, "% hhx", a); /* { dg-warning ". flag used with .%x." } */
/* The following results in between "0" and "0377" for -1. Although
the minimum output would fit, given the '#' flag the likely output
@@ -1295,9 +1295,9 @@ void test_sprintf_chk_h_nonconst (int a)
T (2, "% hd", a); /* { dg-warning "nul past the end" } */
T (2, "% hi", a); /* { dg-warning "nul past the end" } */
- T (2, "% ho", a); /* { dg-warning ". . flag used with .%o." } */
- T (2, "% hu", a); /* { dg-warning ". . flag used with .%u." } */
- T (2, "% hx", a); /* { dg-warning ". . flag used with .%x." } */
+ T (2, "% ho", a); /* { dg-warning ". flag used with .%o." } */
+ T (2, "% hu", a); /* { dg-warning ". flag used with .%u." } */
+ T (2, "% hx", a); /* { dg-warning ". flag used with .%x." } */
T (2, "#%ho", a); /* { dg-warning "nul past the end" } */
T (2, "#%hx", a); /* { dg-warning "nul past the end" } */
@@ -1341,9 +1341,9 @@ void test_sprintf_chk_int_nonconst (int w, int p, int a)
T (2, "% d", a); /* { dg-warning "nul past the end" } */
T (2, "% i", a); /* { dg-warning "nul past the end" } */
- T (2, "% o", a); /* { dg-warning ". . flag used with .%o." } */
- T (2, "% u", a); /* { dg-warning ". . flag used with .%u." } */
- T (2, "% x", a); /* { dg-warning ". . flag used with .%x." } */
+ T (2, "% o", a); /* { dg-warning ". flag used with .%o." } */
+ T (2, "% u", a); /* { dg-warning ". flag used with .%u." } */
+ T (2, "% x", a); /* { dg-warning ". flag used with .%x." } */
T (2, "#%o", a); /* { dg-warning "nul past the end" } */
T (2, "#%x", a); /* { dg-warning "nul past the end" } */
@@ -1504,9 +1504,9 @@ void test_vsprintf_chk_int (va_list va)
T (2, "% d"); /* { dg-warning "nul past the end" } */
T (2, "% i"); /* { dg-warning "nul past the end" } */
- T (2, "% o"); /* { dg-warning ". . flag used with .%o." } */
- T (2, "% u"); /* { dg-warning ". . flag used with .%u." } */
- T (2, "% x"); /* { dg-warning ". . flag used with .%x." } */
+ T (2, "% o"); /* { dg-warning ". flag used with .%o." } */
+ T (2, "% u"); /* { dg-warning ". flag used with .%u." } */
+ T (2, "% x"); /* { dg-warning ". flag used with .%x." } */
T (2, "#%o"); /* { dg-warning "nul past the end" } */
T (2, "#%x"); /* { dg-warning "nul past the end" } */
@@ -1672,9 +1672,9 @@ void test_vsprintf_int (va_list va)
T (2, "% d"); /* { dg-warning "nul past the end" } */
T (2, "% i"); /* { dg-warning "nul past the end" } */
- T (2, "% o"); /* { dg-warning ". . flag used with .%o." } */
- T (2, "% u"); /* { dg-warning ". . flag used with .%u." } */
- T (2, "% x"); /* { dg-warning ". . flag used with .%x." } */
+ T (2, "% o"); /* { dg-warning ". flag used with .%o." } */
+ T (2, "% u"); /* { dg-warning ". flag used with .%u." } */
+ T (2, "% x"); /* { dg-warning ". flag used with .%x." } */
T (2, "#%o"); /* { dg-warning "nul past the end" } */
T (2, "#%x"); /* { dg-warning "nul past the end" } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-2.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-2.c
index f21dae4..0e328ca 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-2.c
@@ -194,7 +194,7 @@ void test_hh_nonconst (int w, int p, int x, unsigned y)
/* { dg-warning ".\\+. flag used" "-Wformat" { target *-*-* } .-1 } */
T (1, "%-.*hhu", 0, y); /* { dg-warning "writing up to 3 bytes" } */
T (1, "% .*hhu", 0, y); /* { dg-warning "writing up to 3 bytes" } */
- /* { dg-warning ". . flag used" "-Wformat" { target *-*-* } .-1 } */
+ /* { dg-warning ". flag used" "-Wformat" { target *-*-* } .-1 } */
}
void test_h_nonconst (int x)
diff --git a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
index 3b6a316..832aeb3 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr19430-O0.c
@@ -6,7 +6,7 @@ extern void baz (int *);
int
foo (int i)
{
- int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } . } */
+ int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } } */
if (bar (i)) {
baz (&j);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr19430.c b/gcc/testsuite/gcc.dg/uninit-pr19430.c
index a21b641..ef47b26 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr19430.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr19430.c
@@ -5,7 +5,7 @@ extern void baz (int *);
int
foo (int i)
{
- int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } . } */
+ int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } } */
if (bar (i)) {
baz (&j);
diff --git a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
index 88099e6..14bd0e2 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
@@ -7,7 +7,7 @@ int foo ()
int j;
if (1 == i)
- return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } . } */
+ return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } } */
return 0;
}
@@ -18,7 +18,7 @@ int bar ()
int j;
if (1 == i)
- return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } . } */
+ return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } } */
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/utf16-4.c b/gcc/testsuite/gcc.dg/utf16-4.c
index 95cfce8..6ef4ae3 100644
--- a/gcc/testsuite/gcc.dg/utf16-4.c
+++ b/gcc/testsuite/gcc.dg/utf16-4.c
@@ -15,7 +15,7 @@ char16_t c5 = U'\u2029';
char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
char16_t c7 = L'a';
char16_t c8 = L'\u2029';
-char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } . } */
+char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } } */
/* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {}
diff --git a/gcc/testsuite/gfortran.dg/pr70006.f90 b/gcc/testsuite/gfortran.dg/pr70006.f90
index 9f14eea..a98d3da 100644
--- a/gcc/testsuite/gfortran.dg/pr70006.f90
+++ b/gcc/testsuite/gfortran.dg/pr70006.f90
@@ -1,9 +1,9 @@
! { dg-do compile }
program test
- print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } . }
- print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } . }
+ print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } }
+ print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } }
!1 format(a)
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } . }
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } . }
+ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } }
+ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } }
!2 continue
end program
diff --git a/gcc/testsuite/obj-c++.dg/fsf-package-0.m b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
index a64253e..c2fc0cf 100644
--- a/gcc/testsuite/obj-c++.dg/fsf-package-0.m
+++ b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
@@ -32,5 +32,5 @@ void foo (void)
a->v2 = 1;
a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */
a->v4 = a->v3 - 1; /* { dg-warning ".v4. is @private" } */
- /* { dg-warning ".v3. is @protected" "" { target *-*-* } . } */
+ /* { dg-warning ".v3. is @protected" "" { target *-*-* } } */
}
Remove '{ target *-*-* } }' in dg-(error|warning|message|bogus)
find $(find -type d -name testsuite) -type f \
| xargs sed -ri \
's#(dg-(error|warning|message|bogus).*) \{ target \*-\*-\* \} \}#\1 }#'
---
gcc/testsuite/g++.dg/parse/error2.C | 2 +-
gcc/testsuite/g++.dg/parse/parameter-declaration-1.C | 2 +-
gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C | 2 +-
gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c | 2 +-
gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c | 2 +-
gcc/testsuite/gcc.dg/cpp/19990413-1.c | 2 +-
gcc/testsuite/gcc.dg/dg-test-1.c | 4 ++--
gcc/testsuite/gcc.dg/empty-source-2.c | 2 +-
gcc/testsuite/gcc.dg/empty-source-3.c | 2 +-
gcc/testsuite/gcc.dg/format/c99-printf-1.c | 4 ++--
gcc/testsuite/gcc.dg/format/c99-scanf-1.c | 2 +-
gcc/testsuite/gcc.dg/label-decl-2.c | 2 +-
gcc/testsuite/gcc.dg/m-un-2.c | 2 +-
gcc/testsuite/gcc.dg/uninit-pr20644-O0.c | 2 +-
gcc/testsuite/gfortran.dg/pr70006.f90 | 8 ++++----
gcc/testsuite/obj-c++.dg/fsf-package-0.m | 2 +-
.../testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc | 2 +-
17 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/gcc/testsuite/g++.dg/parse/error2.C b/gcc/testsuite/g++.dg/parse/error2.C
index cb8f413..1cca27c 100644
--- a/gcc/testsuite/g++.dg/parse/error2.C
+++ b/gcc/testsuite/g++.dg/parse/error2.C
@@ -8,7 +8,7 @@ int func(double);
template <int>
struct Foo {};
-Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } }
+Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" }
// { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } .-1 }
// { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } .-2 }
// { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } .-3 }
diff --git a/gcc/testsuite/g++.dg/parse/parameter-declaration-1.C b/gcc/testsuite/g++.dg/parse/parameter-declaration-1.C
index 22d6f21..1eaa00e 100644
--- a/gcc/testsuite/g++.dg/parse/parameter-declaration-1.C
+++ b/gcc/testsuite/g++.dg/parse/parameter-declaration-1.C
@@ -3,4 +3,4 @@
// { dg-do compile }
struct {
- a(void = 0; a(0), a(0) // { dg-error "" "" { target *-*-* } }
+ a(void = 0; a(0), a(0) // { dg-error "" "" }
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
index 9027061..d298555 100644
--- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
@@ -4,7 +4,7 @@
int foo() {
int x;
- float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "deref" { target *-*-* } } */
+ float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "deref" } */
q = 1.0; /* { dg-warning "does break strict-aliasing" "strict-aliasing" { xfail *-*-* } } */
return x;
}
diff --git a/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c b/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
index d29df30..843885f 100644
--- a/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
+++ b/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
@@ -2,7 +2,7 @@
/* { dg-options "-Wall" } */
-void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } } */
+void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" } */
void bar(long* lp) {
diff --git a/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c b/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
index aebfbdd..ab1130d 100644
--- a/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
+++ b/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
@@ -2,7 +2,7 @@
/* { dg-options "-pedantic" } */
-void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } } */
+void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" } */
void bar(long* lp) {
foo(lp); /* { dg-warning "differ in signedness" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/19990413-1.c b/gcc/testsuite/gcc.dg/cpp/19990413-1.c
index bcb7e52..00f62c8 100644
--- a/gcc/testsuite/gcc.dg/cpp/19990413-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/19990413-1.c
@@ -9,5 +9,5 @@ func(void)
{
FOO(i
= 4)
- else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } } */
+ else; /* { dg-error "'else' without a previous 'if'" "error on this line" } */
}
diff --git a/gcc/testsuite/gcc.dg/dg-test-1.c b/gcc/testsuite/gcc.dg/dg-test-1.c
index b4e22e2..c0e672a 100644
--- a/gcc/testsuite/gcc.dg/dg-test-1.c
+++ b/gcc/testsuite/gcc.dg/dg-test-1.c
@@ -5,7 +5,7 @@
void
foo (void)
{ /* { dg-error "'a' undeclared" "err1" { target *-*-* } .+1 } */
- int z = a + b + c + d;/* { dg-error "'b' undeclared" "err2" { target *-*-* } } */
+ int z = a + b + c + d;/* { dg-error "'b' undeclared" "err2" } */
} /* { dg-error "'c' undeclared" "err3" { target *-*-* } .-1 } */
@@ -13,7 +13,7 @@ foo (void)
/* { dg-warning "unused parameter 'e'" "warn1" { target *-*-* } .+3 } */
void /* { dg-warning "unused parameter 'f'" "warn2" { target *-*-* } .+1 } */
-bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" { target *-*-* } } */
+bar (int e, int f, int g, int h)/* { dg-warning "unused parameter 'g'" "warn3" } */
{ /* { dg-warning "unused parameter 'h'" "warn4" { target *-*-* } .-1 } */
}
diff --git a/gcc/testsuite/gcc.dg/empty-source-2.c b/gcc/testsuite/gcc.dg/empty-source-2.c
index e0f1e20..ae36159 100644
--- a/gcc/testsuite/gcc.dg/empty-source-2.c
+++ b/gcc/testsuite/gcc.dg/empty-source-2.c
@@ -3,4 +3,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
-/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } } */
+/* { dg-warning "ISO C forbids an empty translation unit" "empty" } */
diff --git a/gcc/testsuite/gcc.dg/empty-source-3.c b/gcc/testsuite/gcc.dg/empty-source-3.c
index a1e1d2c..bcd76ac 100644
--- a/gcc/testsuite/gcc.dg/empty-source-3.c
+++ b/gcc/testsuite/gcc.dg/empty-source-3.c
@@ -4,4 +4,4 @@
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
-/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } } */
+/* { dg-error "ISO C forbids an empty translation unit" "empty" } */
diff --git a/gcc/testsuite/gcc.dg/format/c99-printf-1.c b/gcc/testsuite/gcc.dg/format/c99-printf-1.c
index 729e41c..408ad49 100644
--- a/gcc/testsuite/gcc.dg/format/c99-printf-1.c
+++ b/gcc/testsuite/gcc.dg/format/c99-printf-1.c
@@ -62,8 +62,8 @@ foo (int i, unsigned int u, double d, char *s, void *p, int *n,
printf ("%llc", i); /* { dg-warning "length" "bad use of %ll" } */
printf ("%lls", s); /* { dg-warning "length" "bad use of %ll" } */
printf ("%llp", p); /* { dg-warning "length" "bad use of %ll" } */
- printf ("%jd%ji%jo%ju%jx%jX", j, j, uj, uj, uj, uj); /* { dg-bogus "length" "bogus %j warning" { target *-*-* } } */
- printf ("%jn", jn); /* { dg-bogus "length" "bogus %j warning" { target *-*-* } } */
+ printf ("%jd%ji%jo%ju%jx%jX", j, j, uj, uj, uj, uj); /* { dg-bogus "length" "bogus %j warning" } */
+ printf ("%jn", jn); /* { dg-bogus "length" "bogus %j warning" } */
printf ("%jf", d); /* { dg-warning "length" "bad use of %j" } */
printf ("%jF", d); /* { dg-warning "length" "bad use of %j" } */
printf ("%je", d); /* { dg-warning "length" "bad use of %j" } */
diff --git a/gcc/testsuite/gcc.dg/format/c99-scanf-1.c b/gcc/testsuite/gcc.dg/format/c99-scanf-1.c
index 7a8b3e2..521ef1d 100644
--- a/gcc/testsuite/gcc.dg/format/c99-scanf-1.c
+++ b/gcc/testsuite/gcc.dg/format/c99-scanf-1.c
@@ -82,7 +82,7 @@ foo (int *ip, unsigned int *uip, short int *hp, unsigned short int *uhp,
scanf ("%ll[ac]", s); /* { dg-warning "length" "bad use of %ll" } */
scanf ("%llc", s); /* { dg-warning "length" "bad use of %ll" } */
scanf ("%llp", pp); /* { dg-warning "length" "bad use of %ll" } */
- scanf ("%jd%ji%jo%ju%jx%jX%jn", jp, jp, ujp, ujp, ujp, ujp, jn); /* { dg-bogus "length" "bogus %j warning" { target *-*-* } } */
+ scanf ("%jd%ji%jo%ju%jx%jX%jn", jp, jp, ujp, ujp, ujp, ujp, jn); /* { dg-bogus "length" "bogus %j warning" } */
scanf ("%ja", fp); /* { dg-warning "length" "bad use of %j" } */
scanf ("%jA", fp); /* { dg-warning "length" "bad use of %j" } */
scanf ("%je", fp); /* { dg-warning "length" "bad use of %j" } */
diff --git a/gcc/testsuite/gcc.dg/label-decl-2.c b/gcc/testsuite/gcc.dg/label-decl-2.c
index 2ad4272..3ebe290 100644
--- a/gcc/testsuite/gcc.dg/label-decl-2.c
+++ b/gcc/testsuite/gcc.dg/label-decl-2.c
@@ -8,7 +8,7 @@ typedef int b;
void
f (void)
{
- __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } } */
+ __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" } */
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0;
diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c
index 345b9ff..b12c7cb 100644
--- a/gcc/testsuite/gcc.dg/m-un-2.c
+++ b/gcc/testsuite/gcc.dg/m-un-2.c
@@ -15,7 +15,7 @@ struct vtable {
struct vtable mtable = {
malloc,
free
-}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } } */
+}; /* { dg-warning "missing initializer" "warning regression" } */
/* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */
/* With designated initializers, we assume you meant to leave out the
diff --git a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
index 14bd0e2..8ae697a 100644
--- a/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-pr20644-O0.c
@@ -18,7 +18,7 @@ int bar ()
int j;
if (1 == i)
- return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } } */
+ return j; /* { dg-warning "uninitialized" "uninitialized" } */
return 0;
}
diff --git a/gcc/testsuite/gfortran.dg/pr70006.f90 b/gcc/testsuite/gfortran.dg/pr70006.f90
index a98d3da..97b4170 100644
--- a/gcc/testsuite/gfortran.dg/pr70006.f90
+++ b/gcc/testsuite/gfortran.dg/pr70006.f90
@@ -1,9 +1,9 @@
! { dg-do compile }
program test
- print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } }
- print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } }
+ print 1, 'string 1' ! { dg-error "FORMAT label 1" " " }
+ print 1, 'string 2' ! { dg-error "FORMAT label 1" " " }
!1 format(a)
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } }
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } }
+ goto 2 ! { dg-error "Label 2 referenced" " " }
+ goto 2 ! { dg-error "Label 2 referenced" " " }
!2 continue
end program
diff --git a/gcc/testsuite/obj-c++.dg/fsf-package-0.m b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
index c2fc0cf..942c1f4 100644
--- a/gcc/testsuite/obj-c++.dg/fsf-package-0.m
+++ b/gcc/testsuite/obj-c++.dg/fsf-package-0.m
@@ -32,5 +32,5 @@ void foo (void)
a->v2 = 1;
a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */
a->v4 = a->v3 - 1; /* { dg-warning ".v4. is @private" } */
- /* { dg-warning ".v3. is @protected" "" { target *-*-* } } */
+ /* { dg-warning ".v3. is @protected" "" } */
}
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc
index 76999c4..c16ac6f 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc
@@ -31,5 +31,5 @@
void foo()
{
- assert(true); // { dg-error "not declared" "" { target *-*-* } }
+ assert(true); // { dg-error "not declared" "" }
}