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> 2017-04-28 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/evrp7.c: New testcase. * gcc.dg/tree-ssa/evrp7.c: New testcase.
......
...@@ -117,11 +117,11 @@ L1: ...@@ -117,11 +117,11 @@ L1:
switch (i) switch (i)
{ {
case 1: case 1:
{ /* { dg-warning "statement may fall through" "" { target c } . } */ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0; int j = 0;
bar (j); bar (j);
if (j == 8) if (j == 8)
return; /* { dg-warning "statement may fall through" "" { target c++ } . } */ return; /* { dg-warning "statement may fall through" "" { target c++ } } */
} }
case 2: case 2:
bar (99); bar (99);
...@@ -145,13 +145,13 @@ L1: ...@@ -145,13 +145,13 @@ L1:
switch (i) switch (i)
{ {
case 1: case 1:
{ /* { dg-warning "statement may fall through" "" { target c } . } */ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0; int j = 0;
bar (j); bar (j);
if (j == 8) if (j == 8)
bar (1); bar (1);
else else
return; /* { dg-warning "statement may fall through" "" { target c++ } . } */ return; /* { dg-warning "statement may fall through" "" { target c++ } } */
} }
case 2: case 2:
bar (99); bar (99);
...@@ -175,13 +175,13 @@ L1: ...@@ -175,13 +175,13 @@ L1:
switch (i) switch (i)
{ {
case 1: case 1:
{ /* { dg-warning "statement may fall through" "" { target c } . } */ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 0; int j = 0;
bar (j); bar (j);
if (j == 8) if (j == 8)
bar (1); bar (1);
else else
bar (2); /* { dg-warning "statement may fall through" "" { target c++ } . } */ bar (2); /* { dg-warning "statement may fall through" "" { target c++ } } */
} }
case 2: case 2:
bar (99); bar (99);
...@@ -279,9 +279,9 @@ L1: ...@@ -279,9 +279,9 @@ L1:
switch (i) switch (i)
{ {
case 1: case 1:
{ /* { dg-warning "statement may fall through" "" { target c } . } */ { /* { dg-warning "statement may fall through" "" { target c } } */
int j = 9; 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: case 2:
bar (99); bar (99);
......
...@@ -21,8 +21,8 @@ f (int i) ...@@ -21,8 +21,8 @@ f (int i)
switch (i) switch (i)
{ {
case 1: case 1:
{ /* { 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++ } . } */ int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } } */
} }
case 2: case 2:
bar (99); bar (99);
...@@ -31,8 +31,8 @@ f (int i) ...@@ -31,8 +31,8 @@ f (int i)
switch (i) switch (i)
{ {
case 1: case 1:
for (int j = 0; j < 10; 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++ } . } */ map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } } */
case 2: case 2:
bar (99); bar (99);
} }
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
void f (int * int *a) /* { dg-error "expected" } */ 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; a[0:64] = 0;
} }
...@@ -5,7 +5,7 @@ int spawn_1 (); ...@@ -5,7 +5,7 @@ int spawn_1 ();
typedef int(*func) (int); typedef int(*func) (int);
void check () { 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" } */ _Cilk_spawn var (); /* { dg-error "too few arguments to function" } */
} }
...@@ -24,7 +24,7 @@ int vg(void); ...@@ -24,7 +24,7 @@ int vg(void);
int vg2(void); /* { dg-bogus ".noreturn. function returns non-void value" } */ int vg2(void); /* { dg-bogus ".noreturn. function returns non-void value" } */
int vg(void) { 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 } */ } /* { dg-warning "'noreturn' function does return" "does return" { target c } .-1 } */
int vg2(void) { int vg2(void) {
......
...@@ -12,13 +12,13 @@ extern bool foo_b (void); ...@@ -12,13 +12,13 @@ extern bool foo_b (void);
extern int foo_i (void); extern int foo_i (void);
#ifdef __cplusplus #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 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 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 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 <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 #endif
void void
......
...@@ -13,6 +13,6 @@ const static char16_t c5 = U'\u2029'; ...@@ -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 c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
const static char16_t c7 = L'a'; const static char16_t c7 = L'a';
const static char16_t c8 = L'\u2029'; 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 } */ /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {} int main () {}
...@@ -8,7 +8,7 @@ int func(double); ...@@ -8,7 +8,7 @@ int func(double);
template <int> template <int>
struct Foo {}; 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 "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 "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 } // { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } .-3 }
...@@ -13,7 +13,7 @@ void a (unsigned char x) ...@@ -13,7 +13,7 @@ void a (unsigned char x)
return; return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return; 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; return;
if (255 >= (unsigned char) 1) if (255 >= (unsigned char) 1)
return; return;
...@@ -58,7 +58,7 @@ void e (unsigned long long x) ...@@ -58,7 +58,7 @@ void e (unsigned long long x)
int test (int 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; return 1;
else else
return 0; return 0;
......
...@@ -13,7 +13,7 @@ void a (unsigned char x) ...@@ -13,7 +13,7 @@ void a (unsigned char x)
return; return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return; 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; return;
if (255 >= (unsigned char) 1) if (255 >= (unsigned char) 1)
return; return;
...@@ -58,7 +58,7 @@ void e (unsigned long long x) ...@@ -58,7 +58,7 @@ void e (unsigned long long x)
int test (int 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; return 1;
else else
return 0; return 0;
......
...@@ -11,7 +11,7 @@ enum e { ...@@ -11,7 +11,7 @@ enum e {
E1 = UINT_MAX + 1, E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example /* Overflow in an unevaluated part of an expression is OK (example
in the standard). */ 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" } */ 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 } */ /* { 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 /* But as in DR#031, the 1/0 in an evaluated subexpression means the
......
...@@ -11,7 +11,7 @@ enum e { ...@@ -11,7 +11,7 @@ enum e {
E1 = UINT_MAX + 1, E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example /* Overflow in an unevaluated part of an expression is OK (example
in the standard). */ 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" } */ 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 } */ /* { 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 /* But as in DR#031, the 1/0 in an evaluated subexpression means the
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-Wall" } */ /* { 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) { void bar(long* lp) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-options "-pedantic" } */ /* { 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) { void bar(long* lp) {
foo(lp); /* { dg-warning "differ in signedness" } */ foo(lp); /* { dg-warning "differ in signedness" } */
......
...@@ -13,7 +13,7 @@ void a (unsigned char x) ...@@ -13,7 +13,7 @@ void a (unsigned char x)
return; return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return; 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; return;
if (255 >= (unsigned char) 1) if (255 >= (unsigned char) 1)
return; return;
...@@ -61,7 +61,7 @@ void e (unsigned long long x) ...@@ -61,7 +61,7 @@ void e (unsigned long long x)
int test (int 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; return 1;
else else
return 0; return 0;
......
...@@ -13,7 +13,7 @@ void a (unsigned char x) ...@@ -13,7 +13,7 @@ void a (unsigned char x)
return; return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return; 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; return;
if (255 >= (unsigned char) 1) if (255 >= (unsigned char) 1)
return; return;
...@@ -61,7 +61,7 @@ void e (unsigned long long x) ...@@ -61,7 +61,7 @@ void e (unsigned long long x)
int test (int 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; return 1;
else else
return 0; return 0;
......
...@@ -9,5 +9,5 @@ func(void) ...@@ -9,5 +9,5 @@ func(void)
{ {
FOO(i FOO(i
= 4) = 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 @@ ...@@ -5,7 +5,7 @@
void void
foo (void) foo (void)
{ /* { dg-error "'a' undeclared" "err1" { target *-*-* } .+1 } */ { /* { 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 } */ } /* { dg-error "'c' undeclared" "err3" { target *-*-* } .-1 } */
...@@ -13,7 +13,7 @@ foo (void) ...@@ -13,7 +13,7 @@ foo (void)
/* { dg-warning "unused parameter 'e'" "warn1" { target *-*-* } .+3 } */ /* { dg-warning "unused parameter 'e'" "warn1" { target *-*-* } .+3 } */
void /* { dg-warning "unused parameter 'f'" "warn2" { target *-*-* } .+1 } */ 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 } */ { /* { dg-warning "unused parameter 'h'" "warn4" { target *-*-* } .-1 } */
} }
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic" } */ /* { 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 @@ ...@@ -4,4 +4,4 @@
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */ /* { 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; ...@@ -8,7 +8,7 @@ typedef int b;
void void
f (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" } */ __extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
goto c; /* { dg-error "label 'c' used but not defined" } */ goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0; a: (void)0;
......
...@@ -15,7 +15,7 @@ struct vtable { ...@@ -15,7 +15,7 @@ struct vtable {
struct vtable mtable = { struct vtable mtable = {
malloc, malloc,
free free
}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } . } */ }; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } } */
/* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */ /* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */
/* With designated initializers, we assume you meant to leave out the /* With designated initializers, we assume you meant to leave out the
......
...@@ -6,7 +6,7 @@ extern void baz (int *); ...@@ -6,7 +6,7 @@ extern void baz (int *);
int int
foo (int i) 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)) { if (bar (i)) {
baz (&j); baz (&j);
......
...@@ -5,7 +5,7 @@ extern void baz (int *); ...@@ -5,7 +5,7 @@ extern void baz (int *);
int int
foo (int i) 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)) { if (bar (i)) {
baz (&j); baz (&j);
......
...@@ -7,7 +7,7 @@ int foo () ...@@ -7,7 +7,7 @@ int foo ()
int j; int j;
if (1 == i) if (1 == i)
return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } . } */ return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } } */
return 0; return 0;
} }
...@@ -18,7 +18,7 @@ int bar () ...@@ -18,7 +18,7 @@ int bar ()
int j; int j;
if (1 == i) if (1 == i)
return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } . } */ return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } } */
return 0; return 0;
} }
...@@ -15,7 +15,7 @@ char16_t c5 = U'\u2029'; ...@@ -15,7 +15,7 @@ char16_t c5 = U'\u2029';
char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */ char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
char16_t c7 = L'a'; char16_t c7 = L'a';
char16_t c8 = L'\u2029'; 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 } */ /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {} int main () {}
! { dg-do compile } ! { dg-do compile }
program test program test
print 1, 'string 1' ! { 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 *-*-* } . } print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } }
!1 format(a) !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 !2 continue
end program end program
...@@ -32,5 +32,5 @@ void foo (void) ...@@ -32,5 +32,5 @@ void foo (void)
a->v2 = 1; a->v2 = 1;
a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */ a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */
a->v4 = a->v3 - 1; /* { dg-warning ".v4. is @private" } */ 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