Commit c3125b18 by Tom de Vries Committed by Tom de Vries

Remove superfluous ' . ' in dg-(error|warning|message|bogus)

find $(find -type d -name testsuite) -type f \
     | xargs sed -ri 's#(dg-(error|warning|message|bogus).*) \. \}#\1 }#'

2017-04-28  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/Wimplicit-fallthrough-6.c: Remove superfluous ' . ' in
	dg-(error|warning|message|bogus).
	* c-c++-common/Wimplicit-fallthrough-7.c: Same.
	* c-c++-common/cilk-plus/AN/pr61963.c: Same.
	* c-c++-common/cilk-plus/CK/no_args_error.c: Same.
	* c-c++-common/pr20000.c: Same.
	* c-c++-common/pr49706.c: Same.
	* g++.dg/ext/utf16-4.C: Same.
	* g++.dg/parse/error2.C: Same.
	* g++.dg/warn/Wtype-limits-Wextra.C: Same.
	* g++.dg/warn/Wtype-limits.C: Same.
	* g++.dg/warn/overflow-warn-1.C: Same.
	* g++.dg/warn/overflow-warn-3.C: Same.
	* gcc.dg/Wpointer-sign-Wall.c: Same.
	* gcc.dg/Wpointer-sign-pedantic.c: Same.
	* gcc.dg/Wtype-limits-Wextra.c: Same.
	* gcc.dg/Wtype-limits.c: Same.
	* gcc.dg/cpp/19990413-1.c: Same.
	* gcc.dg/dg-test-1.c: Same.
	* gcc.dg/empty-source-2.c: Same.
	* gcc.dg/empty-source-3.c: Same.
	* gcc.dg/label-decl-2.c: Same.
	* gcc.dg/m-un-2.c: Same.
	* gcc.dg/uninit-pr19430-O0.c: Same.
	* gcc.dg/uninit-pr19430.c: Same.
	* gcc.dg/uninit-pr20644-O0.c: Same.
	* gcc.dg/utf16-4.c: Same.
	* gfortran.dg/pr70006.f90: Same.
	* obj-c++.dg/fsf-package-0.m: Same.

From-SVN: r247363
parent 119092c1
2017-04-28 Tom de Vries <tom@codesourcery.com>
* c-c++-common/Wimplicit-fallthrough-6.c: Remove superfluous ' . ' in
dg-(error|warning|message|bogus).
* c-c++-common/Wimplicit-fallthrough-7.c: Same.
* c-c++-common/cilk-plus/AN/pr61963.c: Same.
* c-c++-common/cilk-plus/CK/no_args_error.c: Same.
* c-c++-common/pr20000.c: Same.
* c-c++-common/pr49706.c: Same.
* g++.dg/ext/utf16-4.C: Same.
* g++.dg/parse/error2.C: Same.
* g++.dg/warn/Wtype-limits-Wextra.C: Same.
* g++.dg/warn/Wtype-limits.C: Same.
* g++.dg/warn/overflow-warn-1.C: Same.
* g++.dg/warn/overflow-warn-3.C: Same.
* gcc.dg/Wpointer-sign-Wall.c: Same.
* gcc.dg/Wpointer-sign-pedantic.c: Same.
* gcc.dg/Wtype-limits-Wextra.c: Same.
* gcc.dg/Wtype-limits.c: Same.
* gcc.dg/cpp/19990413-1.c: Same.
* gcc.dg/dg-test-1.c: Same.
* gcc.dg/empty-source-2.c: Same.
* gcc.dg/empty-source-3.c: Same.
* gcc.dg/label-decl-2.c: Same.
* gcc.dg/m-un-2.c: Same.
* gcc.dg/uninit-pr19430-O0.c: Same.
* gcc.dg/uninit-pr19430.c: Same.
* gcc.dg/uninit-pr20644-O0.c: Same.
* gcc.dg/utf16-4.c: Same.
* gfortran.dg/pr70006.f90: Same.
* obj-c++.dg/fsf-package-0.m: Same.
2017-04-28 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/evrp7.c: New testcase.
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
}
......@@ -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" } */
}
......@@ -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) {
......
......@@ -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
......
......@@ -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 () {}
......@@ -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 }
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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) {
......
......@@ -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" } */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 *-*-* } } */
}
......@@ -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 } */
}
......
......@@ -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 *-*-* } } */
......@@ -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 *-*-* } } */
......@@ -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;
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
}
......@@ -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 () {}
! { 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
......@@ -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 *-*-* } } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment