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>
* g++.dg/abi/bitfield3.C: Remove superfluous "" in
dg-(error|warning|message|bogus).
* g++.dg/conversion/dr195-1.C: Same.
* g++.dg/conversion/dr195.C: Same.
* g++.dg/cpp0x/constexpr-reinterpret1.C: Same.
* g++.dg/cpp0x/gen-attrs-14.C: Same.
* g++.dg/cpp0x/inline-ns7.C: Same.
* g++.dg/cpp0x/variadic105.C: Same.
* g++.dg/cpp0x/variadic65.C: Same.
* g++.dg/expr/call2.C: Same.
* g++.dg/expr/member-of-incomplete-type-1.C: Same.
* g++.dg/expr/pmf-1.C: Same.
* g++.dg/ext/altivec-types-1.C: Same.
* g++.dg/ext/altivec-types-2.C: Same.
* g++.dg/ext/altivec-types-3.C: Same.
* g++.dg/ext/attrib14.C: Same.
* g++.dg/ext/complit1.C: Same.
* g++.dg/ext/forscope2.C: Same.
* g++.dg/ext/gnu-inline-global-reject.C: Same.
* g++.dg/ext/label13.C: Same.
* g++.dg/ext/member-attr.C: Same.
* g++.dg/ext/visibility/anon7.C: Same.
* g++.dg/ext/visibility/visibility-7.C: Same.
* g++.dg/ext/vla2.C: Same.
* g++.dg/inherit/access2.C: Same.
* g++.dg/inherit/covariant12.C: Same.
* g++.dg/inherit/covariant14.C: Same.
* g++.dg/inherit/namespace-as-base.C: Same.
* g++.dg/inherit/template-as-base.C: Same.
* g++.dg/lookup/ambig1.C: Same.
* g++.dg/lookup/ambig2.C: Same.
* g++.dg/lookup/ambig3.C: Same.
* g++.dg/lookup/class-member-1.C: Same.
* g++.dg/lookup/conv-1.C: Same.
* g++.dg/lookup/decl1.C: Same.
* g++.dg/lookup/koenig1.C: Same.
* g++.dg/lookup/scoped1.C: Same.
* g++.dg/lookup/scoped2.C: Same.
* g++.dg/lookup/two-stage4.C: Same.
* g++.dg/lookup/used-before-declaration.C: Same.
* g++.dg/lookup/using.C: Same.
* g++.dg/lookup/using17.C: Same.
* g++.dg/lookup/using2.C: Same.
* g++.dg/other/abstract2.C: Same.
* g++.dg/other/classkey1.C: Same.
* g++.dg/other/component1.C: Same.
* g++.dg/other/const1.C: Same.
* g++.dg/other/const2.C: Same.
* g++.dg/other/conversion1.C: Same.
* g++.dg/other/do1.C: Same.
* g++.dg/other/error1.C: Same.
* g++.dg/other/error10.C: Same.
* g++.dg/other/error3.C: Same.
* g++.dg/other/error4.C: Same.
* g++.dg/other/error5.C: Same.
* g++.dg/other/error8.C: Same.
* g++.dg/other/error9.C: Same.
* g++.dg/other/field1.C: Same.
* g++.dg/other/init1.C: Same.
* g++.dg/other/ptrmem2.C: Same.
* g++.dg/other/return1.C: Same.
* g++.dg/overload/builtin3.C: Same.
* g++.dg/overload/error1.C: Same.
* g++.dg/overload/error2.C: Same.
* g++.dg/overload/koenig2.C: Same.
* g++.dg/overload/pmf1.C: Same.
* g++.dg/parse/args1.C: Same.
* g++.dg/parse/attr3.C: Same.
* g++.dg/parse/constant4.C: Same.
* g++.dg/parse/crash10.C: Same.
* g++.dg/parse/crash18.C: Same.
* g++.dg/parse/crash19.C: Same.
* g++.dg/parse/crash20.C: Same.
* g++.dg/parse/crash21.C: Same.
* g++.dg/parse/crash22.C: Same.
* g++.dg/parse/crash32.C: Same.
* g++.dg/parse/decl-specifier-1.C: Same.
* g++.dg/parse/error58.C: Same.
* g++.dg/parse/local-class1.C: Same.
* g++.dg/parse/non-dependent2.C: Same.
* g++.dg/parse/parameter-declaration-1.C: Same.
* g++.dg/parse/ptrmem2.C: Same.
* g++.dg/parse/ptrmem3.C: Same.
* g++.dg/parse/saved1.C: Same.
* g++.dg/tc1/dr101.C: Same.
* g++.dg/tc1/dr142.C: Same.
* g++.dg/tc1/dr176.C: Same.
* g++.dg/template/conv4.C: Same.
* g++.dg/template/crash56.C: Same.
* g++.dg/template/dependent-expr2.C: Same.
* g++.dg/template/error1.C: Same.
* g++.dg/template/error2.C: Same.
* g++.dg/template/explicit6.C: Same.
* g++.dg/template/init-list.C: Same.
* g++.dg/template/local1.C: Same.
* g++.dg/template/lookup2.C: Same.
* g++.dg/template/meminit2.C: Same.
* g++.dg/template/nontype25.C: Same.
* g++.dg/template/ptrmem2.C: Same.
* g++.dg/template/qualttp19.C: Same.
* g++.dg/template/qualttp20.C: Same.
* g++.dg/template/ttp3.C: Same.
* g++.dg/template/unify4.C: Same.
* g++.dg/template/unify6.C: Same.
* g++.dg/template/unify7.C: Same.
* g++.dg/template/warn1.C: Same.
* g++.dg/tree-ssa/dom-invalid.C: Same.
* g++.dg/ubsan/shift-1.C: Same.
* g++.dg/warn/Wunused-2.C: Same.
* g++.dg/warn/Wunused-4.C: Same.
* g++.dg/warn/Wunused-6.C: Same.
* g++.dg/warn/deprecated-6.C: Same.
* g++.dg/warn/deprecated.C: Same.
* g++.dg/warn/effc1.C: Same.
* g++.dg/warn/effc3.C: Same.
* g++.dg/warn/incomplete1.C: Same.
* g++.dg/warn/inline1.C: Same.
* g++.dg/warn/noeffect2.C: Same.
* g++.dg/warn/noeffect4.C: Same.
* g++.dg/warn/oldcast1.C: Same.
* g++.dg/warn/sentinel.C: Same.
* g++.dg/warn/unit-1.C: Same.
* g++.old-deja/g++.pt/inherit2.C: Same.
* g++.old-deja/g++.pt/overload8.C: Same.
* gcc.dg/
20000926-1.c: Same.
* gcc.dg/
20040223-1.c: Same.
* gcc.dg/Warray-bounds-7.c: Same.
* gcc.dg/alias-1.c: Same.
* gcc.dg/alias-12.c: Same.
* gcc.dg/alias-13.c: Same.
* gcc.dg/alias-2.c: Same.
* gcc.dg/array-13.c: Same.
* gcc.dg/array-4.c: Same.
* gcc.dg/attr-ifunc-2.c: Same.
* gcc.dg/attr-invalid.c: Same.
* gcc.dg/attr-noinline.c: Same.
* gcc.dg/bitfld-2.c: Same.
* gcc.dg/c90-const-expr-7.c: Same.
* gcc.dg/c99-const-expr-7.c: Same.
* gcc.dg/cpp/
20000625-1.c: Same.
* gcc.dg/cpp/charconst-4.c: Same.
* gcc.dg/cpp/include2.c: Same.
* gcc.dg/cpp/include2a.c: Same.
* gcc.dg/decl-4.c: Same.
* gcc.dg/deprecated-4.c: Same.
* gcc.dg/deprecated.c: Same.
* gcc.dg/dfp/altivec-types.c: Same.
* gcc.dg/float-range-1.c: Same.
* gcc.dg/pack-test-3.c: Same.
* gcc.dg/pr11492.c: Same.
* gcc.dg/pr15360-1.c: Same.
* gcc.dg/pr37908.c: Same.
* gcc.dg/pr53265.c: Same.
* gcc.dg/pr57287-2.c: Same.
* gcc.dg/pr57287.c: Same.
* gcc.dg/redecl-1.c: Same.
* gcc.dg/sync-3.c: Same.
* gcc.dg/two-types-1.c: Same.
* gcc.dg/two-types-2.c: Same.
* gcc.dg/two-types-4.c: Same.
* gcc.dg/two-types-5.c: Same.
* gcc.dg/two-types-6.c: Same.
* gcc.dg/two-types-7.c: Same.
* gcc.dg/two-types-8.c: Same.
* gcc.dg/two-types-9.c: Same.
* gcc.dg/uninit-I.c: Same.
* gcc.dg/uninit-pr19430.c: Same.
* gcc.dg/visibility-7.c: Same.
* gcc.dg/winline-10.c: Same.
* gcc.dg/winline-2.c: Same.
* gcc.dg/winline-3.c: Same.
* gcc.dg/winline-9.c: Same.
* gcc.target/i386/attr-returns_twice-1.c: Same.
* gcc.target/i386/chkp-const-check-2.c: Same.
* gcc.target/i386/chkp-label-address.c: Same.
* gcc.target/i386/chkp-remove-bndint-2.c: Same.
* gcc.target/i386/pr39162.c: Same.
* gcc.target/i386/sse-5.c: Same.
* gcc.target/powerpc/altivec-types-1.c: Same.
* gcc.target/powerpc/altivec-types-2.c: Same.
* gcc.target/powerpc/altivec-types-3.c: Same.
* gcc.target/powerpc/float128-mix.c: Same.
* gcc.target/powerpc/no-r11-3.c: Same.
* gcc.target/spu/Wmain.c: Same.
* gcc.target/spu/ea/errors2.c: Same.
* gfortran.dg/assignment_1.f90: Same.
* gfortran.dg/common_3.f90: Same.
* gfortran.dg/der_io_1.f90: Same.
* gfortran.dg/g77/
20030326-1.f: Same.
* gfortran.dg/g77/9263.f: Same.
* gfortran.dg/g77/960317-1.f: Same.
* gfortran.dg/g77/970625-2.f: Same.
* gfortran.dg/g77/980615-0.f: Same.
* gfortran.dg/g77/check0.f: Same.
* gfortran.dg/g77/dnrm2.f: Same.
* gfortran.dg/g77/pr9258.f: Same.
* gfortran.dg/ichar_1.f90: Same.
* gfortran.dg/interface_1.f90: Same.
* gfortran.dg/namelist_1.f90: Same.
* gfortran.dg/namelist_2.f90: Same.
* gfortran.dg/namelist_3.f90: Same.
* gfortran.dg/namelist_print_2.f: Same.
* gfortran.dg/oldstyle_1.f90: Same.
* gfortran.dg/runtime_warning_1.f90: Same.
* gfortran.dg/underflow.f90: Same.
* gnat.dg/specs/integer_value.ads: Same.
* obj-c++.dg/fsf-package-0.m: Same.
* objc.dg/two-types-1.m: Same.
From-SVN: r247389
+2017-04-28 Tom de Vries <tom@codesourcery.com>
+
+ * g++.dg/abi/bitfield3.C: Remove superfluous "" in
+ dg-(error|warning|message|bogus).
+ * g++.dg/conversion/dr195-1.C: Same.
+ * g++.dg/conversion/dr195.C: Same.
+ * g++.dg/cpp0x/constexpr-reinterpret1.C: Same.
+ * g++.dg/cpp0x/gen-attrs-14.C: Same.
+ * g++.dg/cpp0x/inline-ns7.C: Same.
+ * g++.dg/cpp0x/variadic105.C: Same.
+ * g++.dg/cpp0x/variadic65.C: Same.
+ * g++.dg/expr/call2.C: Same.
+ * g++.dg/expr/member-of-incomplete-type-1.C: Same.
+ * g++.dg/expr/pmf-1.C: Same.
+ * g++.dg/ext/altivec-types-1.C: Same.
+ * g++.dg/ext/altivec-types-2.C: Same.
+ * g++.dg/ext/altivec-types-3.C: Same.
+ * g++.dg/ext/attrib14.C: Same.
+ * g++.dg/ext/complit1.C: Same.
+ * g++.dg/ext/forscope2.C: Same.
+ * g++.dg/ext/gnu-inline-global-reject.C: Same.
+ * g++.dg/ext/label13.C: Same.
+ * g++.dg/ext/member-attr.C: Same.
+ * g++.dg/ext/visibility/anon7.C: Same.
+ * g++.dg/ext/visibility/visibility-7.C: Same.
+ * g++.dg/ext/vla2.C: Same.
+ * g++.dg/inherit/access2.C: Same.
+ * g++.dg/inherit/covariant12.C: Same.
+ * g++.dg/inherit/covariant14.C: Same.
+ * g++.dg/inherit/namespace-as-base.C: Same.
+ * g++.dg/inherit/template-as-base.C: Same.
+ * g++.dg/lookup/ambig1.C: Same.
+ * g++.dg/lookup/ambig2.C: Same.
+ * g++.dg/lookup/ambig3.C: Same.
+ * g++.dg/lookup/class-member-1.C: Same.
+ * g++.dg/lookup/conv-1.C: Same.
+ * g++.dg/lookup/decl1.C: Same.
+ * g++.dg/lookup/koenig1.C: Same.
+ * g++.dg/lookup/scoped1.C: Same.
+ * g++.dg/lookup/scoped2.C: Same.
+ * g++.dg/lookup/two-stage4.C: Same.
+ * g++.dg/lookup/used-before-declaration.C: Same.
+ * g++.dg/lookup/using.C: Same.
+ * g++.dg/lookup/using17.C: Same.
+ * g++.dg/lookup/using2.C: Same.
+ * g++.dg/other/abstract2.C: Same.
+ * g++.dg/other/classkey1.C: Same.
+ * g++.dg/other/component1.C: Same.
+ * g++.dg/other/const1.C: Same.
+ * g++.dg/other/const2.C: Same.
+ * g++.dg/other/conversion1.C: Same.
+ * g++.dg/other/do1.C: Same.
+ * g++.dg/other/error1.C: Same.
+ * g++.dg/other/error10.C: Same.
+ * g++.dg/other/error3.C: Same.
+ * g++.dg/other/error4.C: Same.
+ * g++.dg/other/error5.C: Same.
+ * g++.dg/other/error8.C: Same.
+ * g++.dg/other/error9.C: Same.
+ * g++.dg/other/field1.C: Same.
+ * g++.dg/other/init1.C: Same.
+ * g++.dg/other/ptrmem2.C: Same.
+ * g++.dg/other/return1.C: Same.
+ * g++.dg/overload/builtin3.C: Same.
+ * g++.dg/overload/error1.C: Same.
+ * g++.dg/overload/error2.C: Same.
+ * g++.dg/overload/koenig2.C: Same.
+ * g++.dg/overload/pmf1.C: Same.
+ * g++.dg/parse/args1.C: Same.
+ * g++.dg/parse/attr3.C: Same.
+ * g++.dg/parse/constant4.C: Same.
+ * g++.dg/parse/crash10.C: Same.
+ * g++.dg/parse/crash18.C: Same.
+ * g++.dg/parse/crash19.C: Same.
+ * g++.dg/parse/crash20.C: Same.
+ * g++.dg/parse/crash21.C: Same.
+ * g++.dg/parse/crash22.C: Same.
+ * g++.dg/parse/crash32.C: Same.
+ * g++.dg/parse/decl-specifier-1.C: Same.
+ * g++.dg/parse/error58.C: Same.
+ * g++.dg/parse/local-class1.C: Same.
+ * g++.dg/parse/non-dependent2.C: Same.
+ * g++.dg/parse/parameter-declaration-1.C: Same.
+ * g++.dg/parse/ptrmem2.C: Same.
+ * g++.dg/parse/ptrmem3.C: Same.
+ * g++.dg/parse/saved1.C: Same.
+ * g++.dg/tc1/dr101.C: Same.
+ * g++.dg/tc1/dr142.C: Same.
+ * g++.dg/tc1/dr176.C: Same.
+ * g++.dg/template/conv4.C: Same.
+ * g++.dg/template/crash56.C: Same.
+ * g++.dg/template/dependent-expr2.C: Same.
+ * g++.dg/template/error1.C: Same.
+ * g++.dg/template/error2.C: Same.
+ * g++.dg/template/explicit6.C: Same.
+ * g++.dg/template/init-list.C: Same.
+ * g++.dg/template/local1.C: Same.
+ * g++.dg/template/lookup2.C: Same.
+ * g++.dg/template/meminit2.C: Same.
+ * g++.dg/template/nontype25.C: Same.
+ * g++.dg/template/ptrmem2.C: Same.
+ * g++.dg/template/qualttp19.C: Same.
+ * g++.dg/template/qualttp20.C: Same.
+ * g++.dg/template/ttp3.C: Same.
+ * g++.dg/template/unify4.C: Same.
+ * g++.dg/template/unify6.C: Same.
+ * g++.dg/template/unify7.C: Same.
+ * g++.dg/template/warn1.C: Same.
+ * g++.dg/tree-ssa/dom-invalid.C: Same.
+ * g++.dg/ubsan/shift-1.C: Same.
+ * g++.dg/warn/Wunused-2.C: Same.
+ * g++.dg/warn/Wunused-4.C: Same.
+ * g++.dg/warn/Wunused-6.C: Same.
+ * g++.dg/warn/deprecated-6.C: Same.
+ * g++.dg/warn/deprecated.C: Same.
+ * g++.dg/warn/effc1.C: Same.
+ * g++.dg/warn/effc3.C: Same.
+ * g++.dg/warn/incomplete1.C: Same.
+ * g++.dg/warn/inline1.C: Same.
+ * g++.dg/warn/noeffect2.C: Same.
+ * g++.dg/warn/noeffect4.C: Same.
+ * g++.dg/warn/oldcast1.C: Same.
+ * g++.dg/warn/sentinel.C: Same.
+ * g++.dg/warn/unit-1.C: Same.
+ * g++.old-deja/g++.pt/inherit2.C: Same.
+ * g++.old-deja/g++.pt/overload8.C: Same.
+ * gcc.dg/20000926-1.c: Same.
+ * gcc.dg/20040223-1.c: Same.
+ * gcc.dg/Warray-bounds-7.c: Same.
+ * gcc.dg/alias-1.c: Same.
+ * gcc.dg/alias-12.c: Same.
+ * gcc.dg/alias-13.c: Same.
+ * gcc.dg/alias-2.c: Same.
+ * gcc.dg/array-13.c: Same.
+ * gcc.dg/array-4.c: Same.
+ * gcc.dg/attr-ifunc-2.c: Same.
+ * gcc.dg/attr-invalid.c: Same.
+ * gcc.dg/attr-noinline.c: Same.
+ * gcc.dg/bitfld-2.c: Same.
+ * gcc.dg/c90-const-expr-7.c: Same.
+ * gcc.dg/c99-const-expr-7.c: Same.
+ * gcc.dg/cpp/20000625-1.c: Same.
+ * gcc.dg/cpp/charconst-4.c: Same.
+ * gcc.dg/cpp/include2.c: Same.
+ * gcc.dg/cpp/include2a.c: Same.
+ * gcc.dg/decl-4.c: Same.
+ * gcc.dg/deprecated-4.c: Same.
+ * gcc.dg/deprecated.c: Same.
+ * gcc.dg/dfp/altivec-types.c: Same.
+ * gcc.dg/float-range-1.c: Same.
+ * gcc.dg/pack-test-3.c: Same.
+ * gcc.dg/pr11492.c: Same.
+ * gcc.dg/pr15360-1.c: Same.
+ * gcc.dg/pr37908.c: Same.
+ * gcc.dg/pr53265.c: Same.
+ * gcc.dg/pr57287-2.c: Same.
+ * gcc.dg/pr57287.c: Same.
+ * gcc.dg/redecl-1.c: Same.
+ * gcc.dg/sync-3.c: Same.
+ * gcc.dg/two-types-1.c: Same.
+ * gcc.dg/two-types-2.c: Same.
+ * gcc.dg/two-types-4.c: Same.
+ * gcc.dg/two-types-5.c: Same.
+ * gcc.dg/two-types-6.c: Same.
+ * gcc.dg/two-types-7.c: Same.
+ * gcc.dg/two-types-8.c: Same.
+ * gcc.dg/two-types-9.c: Same.
+ * gcc.dg/uninit-I.c: Same.
+ * gcc.dg/uninit-pr19430.c: Same.
+ * gcc.dg/visibility-7.c: Same.
+ * gcc.dg/winline-10.c: Same.
+ * gcc.dg/winline-2.c: Same.
+ * gcc.dg/winline-3.c: Same.
+ * gcc.dg/winline-9.c: Same.
+ * gcc.target/i386/attr-returns_twice-1.c: Same.
+ * gcc.target/i386/chkp-const-check-2.c: Same.
+ * gcc.target/i386/chkp-label-address.c: Same.
+ * gcc.target/i386/chkp-remove-bndint-2.c: Same.
+ * gcc.target/i386/pr39162.c: Same.
+ * gcc.target/i386/sse-5.c: Same.
+ * gcc.target/powerpc/altivec-types-1.c: Same.
+ * gcc.target/powerpc/altivec-types-2.c: Same.
+ * gcc.target/powerpc/altivec-types-3.c: Same.
+ * gcc.target/powerpc/float128-mix.c: Same.
+ * gcc.target/powerpc/no-r11-3.c: Same.
+ * gcc.target/spu/Wmain.c: Same.
+ * gcc.target/spu/ea/errors2.c: Same.
+ * gfortran.dg/assignment_1.f90: Same.
+ * gfortran.dg/common_3.f90: Same.
+ * gfortran.dg/der_io_1.f90: Same.
+ * gfortran.dg/g77/20030326-1.f: Same.
+ * gfortran.dg/g77/9263.f: Same.
+ * gfortran.dg/g77/960317-1.f: Same.
+ * gfortran.dg/g77/970625-2.f: Same.
+ * gfortran.dg/g77/980615-0.f: Same.
+ * gfortran.dg/g77/check0.f: Same.
+ * gfortran.dg/g77/dnrm2.f: Same.
+ * gfortran.dg/g77/pr9258.f: Same.
+ * gfortran.dg/ichar_1.f90: Same.
+ * gfortran.dg/interface_1.f90: Same.
+ * gfortran.dg/namelist_1.f90: Same.
+ * gfortran.dg/namelist_2.f90: Same.
+ * gfortran.dg/namelist_3.f90: Same.
+ * gfortran.dg/namelist_print_2.f: Same.
+ * gfortran.dg/oldstyle_1.f90: Same.
+ * gfortran.dg/runtime_warning_1.f90: Same.
+ * gfortran.dg/underflow.f90: Same.
+ * gnat.dg/specs/integer_value.ads: Same.
+ * obj-c++.dg/fsf-package-0.m: Same.
+ * objc.dg/two-types-1.m: Same.
+
2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/79891
struct A
{
char a;
- int b : 224; // { dg-warning "exceeds its type" "" }
+ int b : 224; // { dg-warning "exceeds its type" }
char c;
} a, a4[4];
struct E
{
char m;
- long long n : 160; // { dg-warning "exceeds its type" "" }
+ long long n : 160; // { dg-warning "exceeds its type" }
char o;
} e, e4[4];
po = reinterpret_cast <PO>(pf);
/* These will never be ok, as they are implicit. */
- pv = pf; // { dg-error "invalid conversion" "" }
- pf = pv; // { dg-error "invalid conversion" "" }
+ pv = pf; // { dg-error "invalid conversion" }
+ pf = pv; // { dg-error "invalid conversion" }
}
po = reinterpret_cast <PO>(pf);
/* These will never be ok, as they are implicit. */
- pv = pf; // { dg-error "invalid conversion" "" }
- pf = pv; // { dg-error "invalid conversion" "" }
+ pv = pf; // { dg-error "invalid conversion" }
+ pf = pv; // { dg-error "invalid conversion" }
}
constexpr static Inner & getInner()
/* I am surprised this is considered a constexpr */
- { return *((Inner *)4); } // { dg-error "reinterpret_cast" "" }
+ { return *((Inner *)4); } // { dg-error "reinterpret_cast" }
};
B B::instance;
// The bogus attribute is ignored, but was in TYPE_ATTRIBUTES during
// parsing of the class, causing some variants to have it and some not.
-struct [[gnu::bogus]] A // { dg-warning "ignored" "" }
+struct [[gnu::bogus]] A // { dg-warning "ignored" }
{
virtual ~A();
void foo(const A&);
namespace foo {
inline namespace foo_impl {
- class T; // { dg-message "T" "" }
+ class T; // { dg-message "T" }
}
}
namespace bar {
inline namespace bar_impl {
- class T; // { dg-message "T" "" }
+ class T; // { dg-message "T" }
}
using namespace foo;
}
foo::T *t1;
bar::T *t2;
-baz::T *t3; // { dg-error "(ambiguous|does not name a type)" "" }
+baz::T *t3; // { dg-error "(ambiguous|does not name a type)" }
int main() {
// This shouldn't be an error; this is bug 35722.
- reverse<call_sum>(1,2); // { dg-bogus "no match" "" }
+ reverse<call_sum>(1,2); // { dg-bogus "no match" }
// { dg-bogus "sorry, unimplemented" "candidate explanation" { target *-*-* } 6 }
}
struct tuple {};
template<typename... Args>
-tuple<Args...> foo() { } // { dg-bogus "cannot expand" "" }
+tuple<Args...> foo() { } // { dg-bogus "cannot expand" }
int main()
{
bool mm(D);
void g(C& f) {
- mm(f); // { dg-error "parameter" "" }
+ mm(f); // { dg-error "parameter" }
}
int main()
{
- A::g(); // { dg-error "incomplete" "" }
+ A::g(); // { dg-error "incomplete" }
}
struct A
{
void f();
- void foo(void (A::*)(int)); // { dg-message "void A::foo|no known conversion" "" }
+ void foo(void (A::*)(int)); // { dg-message "void A::foo|no known conversion" }
template<typename T>
void g(T);
void h()
{
void (A::*p)() = &A::f;
- void (A::*q)() = &(A::f); // { dg-error "parenthesized" "" }
- foo(&g<int>); // { dg-error "no matching" "" }
+ void (A::*q)() = &(A::f); // { dg-error "parenthesized" }
+ foo(&g<int>); // { dg-error "no matching" }
}
};
/* These should be rejected as invalid AltiVec types. */
-__vector bool vb; /* { dg-error "AltiVec types" "" } */
-__vector long long vll; /* { dg-error "AltiVec types" "" } */
-__vector unsigned long long vull; /* { dg-error "AltiVec types" "" } */
-__vector signed long long vsll; /* { dg-error "AltiVec types" "" } */
-__vector __bool long long vbll; /* { dg-error "AltiVec types" "" } */
-__vector long long int vlli; /* { dg-error "AltiVec types" "" } */
-__vector unsigned long long int vulli; /* { dg-error "AltiVec types" "" } */
-__vector signed long long int vslli; /* { dg-error "AltiVec types" "" } */
-__vector __bool long long int vblli; /* { dg-error "AltiVec types" "" } */
-__vector double vd1; /* { dg-error "AltiVec types" "" } */
-__vector long double vld; /* { dg-error "AltiVec types" "" } */
-__vector _Complex float vcf; /* { dg-error "AltiVec types" "" } */
-__vector _Complex double vcd; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long double vcld; /* { dg-error "AltiVec types" "" } */
-__vector _Complex signed char vcsc; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned char vcuc; /* { dg-error "AltiVec types" "" } */
-__vector _Complex short vcss; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned short vcus; /* { dg-error "AltiVec types" "" } */
-__vector _Complex int vcsi; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned int vcui; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long vcsl; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned long vcul; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long long vcsll; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned long long vcull; /* { dg-error "AltiVec types" "" } */
-__vector __complex float v_cf; /* { dg-error "AltiVec types" "" } */
-__vector __complex double v_cd; /* { dg-error "AltiVec types" "" } */
-__vector __complex long double v_cld; /* { dg-error "AltiVec types" "" } */
-__vector __complex signed char v_csc; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned char v_cuc; /* { dg-error "AltiVec types" "" } */
-__vector __complex short v_css; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned short v_cus; /* { dg-error "AltiVec types" "" } */
-__vector __complex int v_csi; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned int v_cui; /* { dg-error "AltiVec types" "" } */
-__vector __complex long v_csl; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned long v_cul; /* { dg-error "AltiVec types" "" } */
-__vector __complex long long v_csll; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned long long v_cull; /* { dg-error "AltiVec types" "" } */
+__vector bool vb; /* { dg-error "AltiVec types" } */
+__vector long long vll; /* { dg-error "AltiVec types" } */
+__vector unsigned long long vull; /* { dg-error "AltiVec types" } */
+__vector signed long long vsll; /* { dg-error "AltiVec types" } */
+__vector __bool long long vbll; /* { dg-error "AltiVec types" } */
+__vector long long int vlli; /* { dg-error "AltiVec types" } */
+__vector unsigned long long int vulli; /* { dg-error "AltiVec types" } */
+__vector signed long long int vslli; /* { dg-error "AltiVec types" } */
+__vector __bool long long int vblli; /* { dg-error "AltiVec types" } */
+__vector double vd1; /* { dg-error "AltiVec types" } */
+__vector long double vld; /* { dg-error "AltiVec types" } */
+__vector _Complex float vcf; /* { dg-error "AltiVec types" } */
+__vector _Complex double vcd; /* { dg-error "AltiVec types" } */
+__vector _Complex long double vcld; /* { dg-error "AltiVec types" } */
+__vector _Complex signed char vcsc; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned char vcuc; /* { dg-error "AltiVec types" } */
+__vector _Complex short vcss; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned short vcus; /* { dg-error "AltiVec types" } */
+__vector _Complex int vcsi; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned int vcui; /* { dg-error "AltiVec types" } */
+__vector _Complex long vcsl; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned long vcul; /* { dg-error "AltiVec types" } */
+__vector _Complex long long vcsll; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned long long vcull; /* { dg-error "AltiVec types" } */
+__vector __complex float v_cf; /* { dg-error "AltiVec types" } */
+__vector __complex double v_cd; /* { dg-error "AltiVec types" } */
+__vector __complex long double v_cld; /* { dg-error "AltiVec types" } */
+__vector __complex signed char v_csc; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned char v_cuc; /* { dg-error "AltiVec types" } */
+__vector __complex short v_css; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned short v_cus; /* { dg-error "AltiVec types" } */
+__vector __complex int v_csi; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned int v_cui; /* { dg-error "AltiVec types" } */
+__vector __complex long v_csl; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned long v_cul; /* { dg-error "AltiVec types" } */
+__vector __complex long long v_csll; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned long long v_cull; /* { dg-error "AltiVec types" } */
/* These should be rejected because the component types are invalid. We
don't care about the actual error messages here. */
-__vector __bool unsigned char vbuc; /* { dg-error "" "" } */
-__vector __bool signed char vbsc; /* { dg-error "" "" } */
-__vector __bool unsigned short vbuh; /* { dg-error "" "" } */
-__vector __bool signed short vbsh; /* { dg-error "" "" } */
-__vector __bool unsigned int vbui; /* { dg-error "" "" } */
-__vector __bool signed int vbsi; /* { dg-error "" "" } */
-__vector __bool unsigned vbuj; /* { dg-error "" "" } */
-__vector __bool signed vbsj; /* { dg-error "" "" } */
-__vector signed float vsf; /* { dg-error "" "" } */
-__vector unsigned float vuf; /* { dg-error "" "" } */
-__vector short float vsf; /* { dg-error "" "" } */
-__vector signed double vsd; /* { dg-error "" "" } */
-__vector unsigned double vud; /* { dg-error "" "" } */
-__vector short double vsd; /* { dg-error "" "" } */
-__vector __bool float vbf; /* { dg-error "" "" } */
-__vector __bool double vbd; /* { dg-error "" "" } */
-__vector __bool short float blf; /* { dg-error "" "" } */
-__vector __bool short double vlbd; /* { dg-error "" "" } */
+__vector __bool unsigned char vbuc; /* { dg-error "" } */
+__vector __bool signed char vbsc; /* { dg-error "" } */
+__vector __bool unsigned short vbuh; /* { dg-error "" } */
+__vector __bool signed short vbsh; /* { dg-error "" } */
+__vector __bool unsigned int vbui; /* { dg-error "" } */
+__vector __bool signed int vbsi; /* { dg-error "" } */
+__vector __bool unsigned vbuj; /* { dg-error "" } */
+__vector __bool signed vbsj; /* { dg-error "" } */
+__vector signed float vsf; /* { dg-error "" } */
+__vector unsigned float vuf; /* { dg-error "" } */
+__vector short float vsf; /* { dg-error "" } */
+__vector signed double vsd; /* { dg-error "" } */
+__vector unsigned double vud; /* { dg-error "" } */
+__vector short double vsd; /* { dg-error "" } */
+__vector __bool float vbf; /* { dg-error "" } */
+__vector __bool double vbd; /* { dg-error "" } */
+__vector __bool short float blf; /* { dg-error "" } */
+__vector __bool short double vlbd; /* { dg-error "" } */
/* These should get warnings for 32-bit code. */
-__vector long vl; /* { dg-warning "deprecated" "" } */
-__vector unsigned long vul; /* { dg-warning "deprecated" "" } */
-__vector signed long vsl; /* { dg-warning "deprecated" "" } */
-__vector __bool long int vbli; /* { dg-warning "deprecated" "" } */
-__vector long int vli; /* { dg-warning "deprecated" "" } */
-__vector unsigned long int vuli; /* { dg-warning "deprecated" "" } */
-__vector signed long int vsli; /* { dg-warning "deprecated" "" } */
+__vector long vl; /* { dg-warning "deprecated" } */
+__vector unsigned long vul; /* { dg-warning "deprecated" } */
+__vector signed long vsl; /* { dg-warning "deprecated" } */
+__vector __bool long int vbli; /* { dg-warning "deprecated" } */
+__vector long int vli; /* { dg-warning "deprecated" } */
+__vector unsigned long int vuli; /* { dg-warning "deprecated" } */
+__vector signed long int vsli; /* { dg-warning "deprecated" } */
/* These should be rejected for 64-bit code. */
-__vector long vl; /* { dg-error "invalid for 64" "" } */
-__vector unsigned long vul; /* { dg-error "invalid for 64" "" } */
-__vector signed long vsl; /* { dg-error "invalid for 64" "" } */
-__vector __bool long int vbli; /* { dg-error "invalid for 64" "" } */
-__vector long int vli; /* { dg-error "invalid for 64" "" } */
-__vector unsigned long int vuli; /* { dg-error "invalid for 64" "" } */
-__vector signed long int vsli; /* { dg-error "invalid for 64" "" } */
+__vector long vl; /* { dg-error "invalid for 64" } */
+__vector unsigned long vul; /* { dg-error "invalid for 64" } */
+__vector signed long vsl; /* { dg-error "invalid for 64" } */
+__vector __bool long int vbli; /* { dg-error "invalid for 64" } */
+__vector long int vli; /* { dg-error "invalid for 64" } */
+__vector unsigned long int vuli; /* { dg-error "invalid for 64" } */
+__vector signed long int vsli; /* { dg-error "invalid for 64" } */
// The bogus attribute is ignored, but was in TYPE_ATTRIBUTES during
// parsing of the class, causing some variants to have it and some not.
-struct __attribute__((bogus)) A // { dg-warning "ignored" "" }
+struct __attribute__((bogus)) A // { dg-warning "ignored" }
{
virtual ~A();
void foo(const A&);
};
Foo::Foo(int v0, int v1)
- : val_((int[]) {v0, v1}) // { dg-error "" "" }
+ : val_((int[]) {v0, v1}) // { dg-error "" }
{
}
void Go( )
{
- for (int i = 1;;) // { dg-warning "using obsolete binding" "" }
+ for (int i = 1;;) // { dg-warning "using obsolete binding" }
{
switch (1) {
default: {}
}
A d;
}
- i; // { dg-warning "name lookup" "" }
+ i; // { dg-warning "name lookup" }
}
#undef fn
#define fn pfx(func_decl_inline_before)
-decl(inline, fn) // { dg-message "previous" "" }
-gnuindef(fn, 0) // { dg-error "redeclared" "" }
+decl(inline, fn) // { dg-message "previous" }
+gnuindef(fn, 0) // { dg-error "redeclared" }
#undef fn
#define fn pfx(func_decl_inline_after)
-gnuindef(fn, 0) // { dg-message "previous" "" }
-decl(inline, fn) // { dg-error "redeclared" "" }
+gnuindef(fn, 0) // { dg-message "previous" }
+decl(inline, fn) // { dg-error "redeclared" }
#undef fn
#define fn pfx(func_def_gnuin_redef)
-gnuindef(fn, 0) // { dg-message "previous" "" }
-gnuindef(fn, 1) // { dg-error "redefinition" "" }
+gnuindef(fn, 0) // { dg-message "previous" }
+gnuindef(fn, 1) // { dg-error "redefinition" }
#undef fn
#define fn pfx(func_def_inline_redef)
-def(inline, fn, 0) // { dg-message "previous" "" }
-def(inline, fn, 1) // { dg-error "redefinition" "" }
+def(inline, fn, 0) // { dg-message "previous" }
+def(inline, fn, 1) // { dg-error "redefinition" }
#undef fn
#define fn pfx(func_def_inline_after)
-gnuindef(fn, 0) // { dg-message "previous" "" }
-def(inline, fn, 1) // { dg-error "redeclare" "" }
+gnuindef(fn, 0) // { dg-message "previous" }
+def(inline, fn, 1) // { dg-error "redeclare" }
#undef fn
#define fn pfx(func_def_inline_before)
-def(inline, fn, 0) // { dg-message "previous" "" }
-gnuindef(fn, 1) // { dg-error "redefinition" "" }
+def(inline, fn, 0) // { dg-message "previous" }
+gnuindef(fn, 1) // { dg-error "redefinition" }
#undef fn
#define fn pfx(func_def_before)
-def(, fn, 0) // { dg-message "previous" "" }
-gnuindef(fn, 1) // { dg-error "redefinition" "" }
+def(, fn, 0) // { dg-message "previous" }
+gnuindef(fn, 1) // { dg-error "redefinition" }
#undef fn
#define fn pfx(func_decl_static_inline_before)
-decl(static inline, fn) // { dg-message "previous" "" }
-gnuindef(fn, 0) // { dg-error "redeclared" "" }
+decl(static inline, fn) // { dg-message "previous" }
+gnuindef(fn, 0) // { dg-error "redeclared" }
#undef fn
#define fn pfx(func_def_static_inline_after)
decl(static, fn)
-gnuindef(fn, 0) // { dg-message "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" }
decl(static, fn)
-def(static inline, fn, 1) // { dg-error "redeclare" "" }
+def(static inline, fn, 1) // { dg-error "redeclare" }
C();
};
-C::C() // { dg-bogus "can never be copied" "" }
+C::C() // { dg-bogus "can never be copied" }
{
static void *labelref = &&label;
goto *labelref;
class T {
public:
- __attribute__ ((garbage1)) void member1(int) {} /* { dg-warning "'garbage1' attribute directive ignored" "" } */
- void __attribute__ ((garbage2)) member2(int) {} /* { dg-warning "'garbage2' attribute directive ignored" "" } */
+ __attribute__ ((garbage1)) void member1(int) {} /* { dg-warning "'garbage1' attribute directive ignored" } */
+ void __attribute__ ((garbage2)) member2(int) {} /* { dg-warning "'garbage2' attribute directive ignored" } */
};
namespace
{
struct A {
- static int bar (); // { dg-error "used but never defined" "" }
+ static int bar (); // { dg-error "used but never defined" }
static int i; // { dg-error "used, but not defined" "" { xfail *-*-* } }
static int j;
static int k;
extern int
__attribute__((visibility ("hidden")))
-xyzzy; /* { dg-message "previous declaration" "" } */
+xyzzy; /* { dg-message "previous declaration" } */
int
__attribute__((visibility ("protected")))
-xyzzy = 5; /* { dg-warning "visibility attribute ignored" "" } */
+xyzzy = 5; /* { dg-warning "visibility attribute ignored" } */
{
char d[i] ;
- begin(d); // { dg-error "no matching function" "" }
+ begin(d); // { dg-error "no matching function" }
// { dg-message "(candidate|valid template argument)" "candidate note" { target *-*-* } .-1 }
}
void A::f ()
{
- A* ap = &b; // { dg-error "base|inherit" "" }
+ A* ap = &b; // { dg-error "base|inherit" }
}
struct B
{
- virtual T *Foo (); // { dg-error "overriding" "" }
+ virtual T *Foo (); // { dg-error "overriding" }
};
struct D : B
{
- virtual S *Foo (); // { dg-error "invalid covariant" "" }
+ virtual S *Foo (); // { dg-error "invalid covariant" }
};
struct B
{
- virtual A* foo(); // { dg-error "overriding" "" }
+ virtual A* foo(); // { dg-error "overriding" }
};
namespace N
{
struct A : B
{
- virtual A* foo(); // { dg-error "invalid covariant" "" }
+ virtual A* foo(); // { dg-error "invalid covariant" }
};
}
}
}
-class Klasse : public Out::In { // { dg-error ".*" "" }
+class Klasse : public Out::In { // { dg-error ".*" }
};
template<typename> struct X { };
}
-struct A : N::X { }; // { dg-error "expected class-name" "" }
+struct A : N::X { }; // { dg-error "expected class-name" }
// Bug 16889:Undetected ambiguity.
struct B {
- int f(); // { dg-message "int B::f" "" }
+ int f(); // { dg-message "int B::f" }
};
struct B1 : virtual B {};
struct B2 : B {};
struct BB : B1, B2 {};
-int i = BB().f(); // { dg-error "ambiguous" "" }
+int i = BB().f(); // { dg-error "ambiguous" }
// Bug 16889:Undetected ambiguity.
struct B {
- int i; // { dg-message "int B::i" "" }
+ int i; // { dg-message "int B::i" }
};
struct B1 : virtual B {};
struct B2 : B {};
struct BB : B1, B2 {};
-int i = BB().i; // { dg-error "ambiguous" "" }
+int i = BB().i; // { dg-error "ambiguous" }
// Follow on from Bug 16889:Undetected ambiguity.
struct B {
- int f(); // { dg-message "int B::f" "" }
+ int f(); // { dg-message "int B::f" }
};
struct B1 : virtual B {};
struct B2_2 : B2 {};
struct BB : B1, B2_2 {};
-int i = BB().f(); // { dg-error "ambiguous" "" }
+int i = BB().f(); // { dg-error "ambiguous" }
int main()
{
A a;
- a.i = 9; // { dg-error "no member" "" }
+ a.i = 9; // { dg-error "no member" }
}
struct A1
{
- operator int () const; // { dg-message "A1::operator" "" }
+ operator int () const; // { dg-message "A1::operator" }
};
struct A2
{
- operator int () const; // { dg-message "A2::operator" "" }
+ operator int () const; // { dg-message "A2::operator" }
};
struct B : A1, A2
int Foo (B const &b)
{
- return b; // { dg-error "ambiguous" "" }
+ return b; // { dg-error "ambiguous" }
}
struct A
{
- operator int (); // { dg-error "operator" "" }
- operator float (); // { dg-error "operator" "" }
- operator float () const; // { dg-error "operator" "" }
- template <typename T> operator T * (); // { dg-error "candidates" "" }
+ operator int (); // { dg-error "operator" }
+ operator float (); // { dg-error "operator" }
+ operator float () const; // { dg-error "operator" }
+ template <typename T> operator T * (); // { dg-error "candidates" }
};
-A::operator short () { // { dg-error "prototype for" "" }
+A::operator short () { // { dg-error "prototype for" }
return 0;
}
class X;
void foo() {
- X x(1); // { dg-error "incomplete type" "" }
- bar(x); // { dg-error "3:'bar' was not declared" "" }
+ X x(1); // { dg-error "incomplete type" }
+ bar(x); // { dg-error "3:'bar' was not declared" }
}
struct A
{
static int i1;
- int i2; // { dg-message "declared" "" }
+ int i2; // { dg-message "declared" }
static void f1 ();
void f2 ();
};
void g ()
{
::A::i1 = 1;
- ::A::i2 = 1; // { dg-error "(access)|(context)" "" }
+ ::A::i2 = 1; // { dg-error "(access)|(context)" }
::A::f1 ();
::A::f2 (); // { dg-error "" }
}
{
void Foo ()
{
- Base::Baz (); // { dg-error "is not a member" "" }
+ Base::Baz (); // { dg-error "is not a member" }
}
};
template<typename T>
void g(T, wrap<wrap<int> > x)
{
- bool b = x == x; // { dg-bogus "" "" }
+ bool b = x == x; // { dg-bogus "" }
}
template<typename T> void operator==(wrap<wrap<T> >, wrap<wrap<T> >);
// Copyroght (C) 2003 Free Software Foundation
// Origin: PR/12832, Jonathan Wakely <redi@gcc.gnu.org>
-void f() { g(); } // { dg-error "12:'g' was not declared" "" }
+void f() { g(); } // { dg-error "12:'g' was not declared" }
void g() { }
int main()
{
Derived d;
- X x = d.f(); // { dg-bogus "Y" "" }
+ X x = d.f(); // { dg-bogus "Y" }
}
using namespace M;
-struct S s; // { dg-error "reference to 'S' is ambiguous|invalid type in declaration" "" }
+struct S s; // { dg-error "reference to 'S' is ambiguous|invalid type in declaration" }
template<int> void f() {}
}
-using N; // { dg-error "(using-declaration)|(nested-name)" "" }
-using ::N; // { dg-error "using-declaration" "" }
-using N::f< 0 >; // { dg-error "using-declaration" "" }
+using N; // { dg-error "(using-declaration)|(nested-name)" }
+using ::N; // { dg-error "using-declaration" }
+using N::f< 0 >; // { dg-error "using-declaration" }
struct A {
template <class T> void f(T);
};
struct C : A {
- using A::f<double>; // { dg-error "using-declaration" "" }
- using A::X<int>; // { dg-error "using-declaration" "" }
+ using A::f<double>; // { dg-error "using-declaration" }
+ using A::X<int>; // { dg-error "using-declaration" }
};
}
namespace N3 {
- struct X { // { dg-message "note" "" }
+ struct X { // { dg-message "note" }
virtual void xfunc(void) = 0; // { dg-message "note" }
};
void g(X parm13); // { dg-error "abstract" }
// PR 775. Some mismatches which were broken.
template <class T> struct A {};
-union A<int> a; // { dg-error "'union' tag" "" }
+union A<int> a; // { dg-error "'union' tag" }
-template <> union A<float> {}; // { dg-error "'union' tag" "" }
+template <> union A<float> {}; // { dg-error "'union' tag" }
struct B {};
-union B b; // { dg-error "'union' tag" "" }
+union B b; // { dg-error "'union' tag" }
union C {};
-class C c; // { dg-error "'class' tag" "" }
+class C c; // { dg-error "'class' tag" }
(c.f<int>) (2);
- c.g; // { dg-error "statement cannot resolve" "" }
- c.f; // { dg-error "statement cannot resolve" "" }
- c.f<int>; // { dg-error "statement cannot resolve" "" }
+ c.g; // { dg-error "statement cannot resolve" }
+ c.f; // { dg-error "statement cannot resolve" }
+ c.f<int>; // { dg-error "statement cannot resolve" }
- c.g == 1; // { dg-error "invalid" "" }
- c.f == 1; // { dg-error "invalid" "" }
- c.f<int> == 1; // { dg-error "invalid" "" }
+ c.g == 1; // { dg-error "invalid" }
+ c.f == 1; // { dg-error "invalid" }
+ c.f<int> == 1; // { dg-error "invalid" }
}
void Foo::Modify(unsigned j) const
{
- Foo::i = j; // { dg-error "assignment of member" "" }
+ Foo::i = j; // { dg-error "assignment of member" }
}
void bad ()
{
- this->*(bars[0].b) = 42; // { dg-bogus "read-only" "" }
+ this->*(bars[0].b) = 42; // { dg-bogus "read-only" }
}
};
{
long long m;
- (void (QObject::*)()) m; // { dg-error "invalid cast" "" }
+ (void (QObject::*)()) m; // { dg-error "invalid cast" }
}
void init ()
{
do { } while (0)
- obj = 0; // { dg-error "expected|not declared" "" }
+ obj = 0; // { dg-error "expected|not declared" }
}
int fudge[40];
int bar [40];
inline int access(int i) {
- return bar(i); // { dg-error "cannot be used as a function" "" }
+ return bar(i); // { dg-error "cannot be used as a function" }
}
};
void bar()
{
- foo(A<0>()); // { dg-message "required from here" "" }
+ foo(A<0>()); // { dg-message "required from here" }
}
void (*g() throw())(); // { dg-message "g\\(\\) throw" "" { target { ! c++1z } } }
// { dg-message "g\\(\\) noexcept" "" { target c++1z } .-1 }
-void (*g())(); // { dg-error "" "" }
+void (*g())(); // { dg-error "" }
struct Wrapper {};
-void Foo(int const &); // { dg-message "in passing" "" }
+void Foo(int const &); // { dg-message "in passing" }
void Baz ()
{
- Foo (Wrapper ()); // { dg-error "Wrapper" "" }
+ Foo (Wrapper ()); // { dg-error "Wrapper" }
}
};
template <typename T> struct S2 : S<T> {
- using S<T>::operator typename S<T>::I*; // { dg-error "operator S\\<int\\>" "" }
+ using S<T>::operator typename S<T>::I*; // { dg-error "operator S\\<int\\>" }
};
-template struct S2<int>; // { dg-message "required" "" }
+template struct S2<int>; // { dg-message "required" }
int alpha; // { dg-error "" "" { xfail *-*-* } }
int beta;
}; // { dg-bogus "" "misplaced position of the declaration" { xfail *-*-* } }
- double alpha; // { dg-error "" "" }
+ double alpha; // { dg-error "" }
}
struct C : public B, public A
{
- C () // { dg-warning "when initialized" "" }
- : A(), B() // { dg-warning "base .\[AB\]." "" }
+ C () // { dg-warning "when initialized" }
+ : A(), B() // { dg-warning "base .\[AB\]." }
{ }
};
struct test
{
- char test; // { dg-error "with same name as class" "" }
+ char test; // { dg-error "with same name as class" }
test();
};
template <typename T> struct X
{
- char X; // { dg-error "with same name as class" "" }
+ char X; // { dg-error "with same name as class" }
X ();
};
template <> struct X<int> {
- char X; // { dg-error "with same name as class" "" }
+ char X; // { dg-error "with same name as class" }
X();
};
-X<float> i; // { dg-message "required from" "" }
+X<float> i; // { dg-message "required from" }
class T
{
typedef int Foo;
- T () : Foo () {} // { dg-error "T::Foo' is not" "" }
+ T () : Foo () {} // { dg-error "T::Foo' is not" }
};
struct S : B
int D::Foo ()
{
- f1( &D::m); // { dg-error "cannot create pointer to ref" "" }
+ f1( &D::m); // { dg-error "cannot create pointer to ref" }
f1( &(D::m)); // ok
f2( &D::s); // ok
f2( &(D::s)); // ok
int Foo ()
{
- f1( &D::m); // { dg-error "cannot create pointer to ref" "" }
+ f1( &D::m); // { dg-error "cannot create pointer to ref" }
f1( &(D::m)); // { dg-error "non-static" }
f2( &D::s); // ok
f2( &(D::s)); // ok
struct wxString;
struct wxString* wxGetEmptyString();
-struct wxString GetHeader() // { dg-error "return type" "" }
+struct wxString GetHeader() // { dg-error "return type" }
{
return *wxGetEmptyString();
}
}
using std::fabs;
-double (*p) (double) = &fabs; // { dg-bogus "is ambiguous" "" }
+double (*p) (double) = &fabs; // { dg-bogus "is ambiguous" }
struct S
{
- void f () {} // { dg-error "with" "" }
- int f () { return 0; } // { dg-error "overloaded" "" }
+ void f () {} // { dg-error "with" }
+ int f () { return 0; } // { dg-error "overloaded" }
};
struct A
{
- void foo(); // { dg-error "with" "" }
- virtual void foo(); // { dg-error "cannot be overloaded" "" }
+ void foo(); // { dg-error "with" }
+ virtual void foo(); // { dg-error "cannot be overloaded" }
};
void Foo ()
{
- anyfunc (&dummy<>); // { dg-error "cannot resolve overload" "" }
+ anyfunc (&dummy<>); // { dg-error "cannot resolve overload" }
}
int main ()
{
- f (aip); // { dg-error "'A' is an inaccessible base of 'B'|conversion" "" }
+ f (aip); // { dg-error "'A' is an inaccessible base of 'B'|conversion" }
}
void Foo (int)
{
- Foo(2 2); // { dg-error "expected" "" }
+ Foo(2 2); // { dg-error "expected" }
}
struct S { enum __attribute__ ((deprecated)) F { f = e }; };
int main () {
- E x; // { dg-warning "'E' is deprecated" "" }
+ E x; // { dg-warning "'E' is deprecated" }
x = e;
- S::F y; // { dg-warning "'F' is deprecated" "" }
+ S::F y; // { dg-warning "'F' is deprecated" }
y = S::f;
return x + y;
static const unsigned J = X<T>::J; // { dg-message "not initialized with a constant expression" }
- Y<J> j; // { dg-error "constant|template argument" "" }
+ Y<J> j; // { dg-error "constant|template argument" }
}
struct A
void Baz ()
{
- Foo<int> (); // { dg-message "required" "" }
+ Foo<int> (); // { dg-message "required" }
}
class
{
typename::
-; // { dg-error "" "" }
+; // { dg-error "" }
// PR 18095: ICE
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
-struct A // { dg-error "expected" "" }
+struct A // { dg-error "expected" }
// PR 18095: ICE
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
-struct A {} // { dg-error "expected" "" }
+struct A {} // { dg-error "expected" }
template<typename T> struct A
{
- typedef typename T::X Y; // { dg-error "not a class" "" }
+ typedef typename T::X Y; // { dg-error "not a class" }
};
-A<int>::Y y; // { dg-message "required from here" "" }
+A<int>::Y y; // { dg-message "required from here" }
namespace N
{
- struct A; // { dg-message "previous declaration" "" }
+ struct A; // { dg-message "previous declaration" }
}
template<int I>
-struct N::A {}; // { dg-error "redeclared" "" }
+struct N::A {}; // { dg-error "redeclared" }
using namespace N;
-int A::i; // { dg-message "ambiguous|declared here" "" }
-int A::i; // { dg-message "ambiguous|redefinition of" "" }
+int A::i; // { dg-message "ambiguous|declared here" }
+int A::i; // { dg-message "ambiguous|redefinition of" }
namespace N
{
void
Ast::accept (Visitor& v)
{
- v (*this); // { dg-error "no match for call" "" }
+ v (*this); // { dg-error "no match for call" }
}
struct X { };
}
-N::X X; // { dg-error "" "" }
+N::X X; // { dg-error "" }
int main()
{
struct A;
void foo ();
-void f() { alignas (foo (A)); } // { dg-error "expected" "" }
+void f() { alignas (foo (A)); } // { dg-error "expected" }
{
class c
{
- friend void g () { } // { dg-error "local class" "" }
+ friend void g () { } // { dg-error "local class" }
};
}
template <class T>
struct Foo {
int j; // we never see this one.
- int k; // { dg-message "Foo" "" }
+ int k; // { dg-message "Foo" }
};
struct Baz
{
int j;
- int k; // { dg-message "candidates" "" }
+ int k; // { dg-message "candidates" }
};
struct Bar : public Foo<T>, Baz {
int baz () { return j; } // binds to Baz::j
- int foo () { return this->k; } // { dg-error "request for member" "" }
+ int foo () { return this->k; } // { dg-error "request for member" }
};
int main()
Bar<int> bar;
bar.baz ();
- bar.foo (); // { dg-message "required" "" }
+ bar.foo (); // { dg-message "required" }
return 0;
}
// { dg-do compile }
struct {
- a(void = 0; a(0), a(0) // { dg-error "" "" }
+ a(void = 0; a(0), a(0) // { dg-error "" }
namespace A {}
-int A::* p; // { dg-error "is a namespace" "" }
+int A::* p; // { dg-error "is a namespace" }
template<typename> struct A
{
- int A<0>::* p; // { dg-error "(type/value mismatch)|(expected)" "" }
+ int A<0>::* p; // { dg-error "(type/value mismatch)|(expected)" }
};
// Test that the parser doesn't go into an infinite loop from ignoring the
// PRE_PARSED_FUNCTION_DECL token.
-class C { static void* operator new(size_t); }; // { dg-error "" "" }
-void* C::operator new(size_t) { return 0; } // { dg-error "" "" }
-class D { D(int i): integer(i){}}; // { dg-error "" "" }
+class C { static void* operator new(size_t); }; // { dg-error "" }
+void* C::operator new(size_t) { return 0; } // { dg-error "" }
+class D { D(int i): integer(i){}}; // { dg-error "" }
namespace Test2 {
- typedef unsigned int X; // { dg-bogus "X" "" }
+ typedef unsigned int X; // { dg-bogus "X" }
extern "C" int f2();
namespace N {
- typedef unsigned int X; // { dg-bogus "X" "" }
+ typedef unsigned int X; // { dg-bogus "X" }
extern "C" int f2();
}
using namespace N;
};
void DD::f() {
- mi = 3; // { dg-error "within this context" "" }
- si = 3; // { dg-error "within this context" "" }
+ mi = 3; // { dg-error "within this context" }
+ si = 3; // { dg-error "within this context" }
::B b;
b.mi = 3;
b.si = 3;
::B::si = 3;
- ::B* bp1 = this; // { dg-error "inaccessible base" "" }
+ ::B* bp1 = this; // { dg-error "inaccessible base" }
::B* bp2 = (::B*)this;
bp2->mi = 3;
- B b2; // { dg-error "within this context" "" }
- B::si = 3; // { dg-error "within this context" "" }
+ B b2; // { dg-error "within this context" }
+ B::si = 3; // { dg-error "within this context" }
}
template <class T> struct Base {
Base* p;
Base<T*>* p2;
- ::Base* p3; // { dg-error "" "" }
+ ::Base* p3; // { dg-error "" }
};
template <class T> struct Derived: public Base<T> {
namespace N2 {
template <class T> struct Base {};
template <class T> struct Derived: public Base<T> {
- typename Derived::template Base<double>* p1; // { dg-bogus "" "" }
+ typename Derived::template Base<double>* p1; // { dg-bogus "" }
};
template struct Derived<void>;
{
int Foo ()
{
- return operator int (); // { dg-error "not defined" "" }
+ return operator int (); // { dg-error "not defined" }
}
};
template<typename T> void g (N::A *p)
{
- (void) A (p); // { dg-message "" "" }
+ (void) A (p); // { dg-message "" }
}
{
bool bar(A& a)
{
- return a.foo == 0; // { dg-error "" "" }
+ return a.foo == 0; // { dg-error "" }
}
};
template <class T> void make_pair(T x);
void foo(){
- struct fps_chan_ID fps; // { dg-error "incomplete" "" }
- make_pair(fps); // { dg-bogus "no matching function" "" }
+ struct fps_chan_ID fps; // { dg-error "incomplete" }
+ make_pair(fps); // { dg-bogus "no matching function" }
}
template<class T >
struct Derived
{
- class Nested : public X<T> // { dg-message "required" "" }
+ class Nested : public X<T> // { dg-message "required" }
{
};
- Nested m; // { dg-message "required" "" }
+ Nested m; // { dg-message "required" }
void Foo ();
};
void Foo (Derived<void> &x)
{
- x.Foo (); // { dg-message "required" "" }
+ x.Foo (); // { dg-message "required" }
}
// Bug 19895: ICE on invalid
struct A;
-template A<>::A(); // { dg-error "(not a template)|(explicit qualification)" "" }
+template A<>::A(); // { dg-error "(not a template)|(explicit qualification)" }
};
template<typename T>
-Derived<T>::Derived() : Base(4) { } // { dg-error "have any field" "" }
+Derived<T>::Derived() : Base(4) { } // { dg-error "have any field" }
struct B
{
void g() {}
- static int x; // { dg-error "static.*int A::f\\(\\)::B::x" "" }
+ static int x; // { dg-error "static.*int A::f\\(\\)::B::x" }
};
}
template <typename T> void Bar ()
{
- T::foo (); // { dg-error "is not a member of" "" }
+ T::foo (); // { dg-error "is not a member of" }
}
void Foo ()
{
- Bar<B> (); // { dg-message "required" "" }
+ Bar<B> (); // { dg-message "required" }
}
template <typename T>
struct B : O<T>::template I<int> {
- B() : O<T>::I<int>() // { dg-error "used as template|it is a template" "" }
+ B() : O<T>::I<int>() // { dg-error "used as template|it is a template" }
{}
};
template<const B* b> class D {};
template<B* b> class E {};
-template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" "" }
+template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" }
template<const B* b> void g(D<b> &, E<const_cast<B*>(b)> &) {} // { dg-error "" "" { target { ! c++11 } } }
B b;
void Baz ()
{
- Foo <int &> (); // { dg-error "no matching function" "" }
+ Foo <int &> (); // { dg-error "no matching function" }
}
// Two typedefs lead to the instant. of the less spec. ("wrong") template
typedef int& r_type;
typedef const r_type cr_type;
- call_traits<cr_type>::type_less_spec var = num; // { dg-error "" "" }
+ call_traits<cr_type>::type_less_spec var = num; // { dg-error "" }
// The explicit type leads to the instantiation of the "correct" one
call_traits<const int&>::type_more_spec var2 = num;
template <typename T> struct B1 : T
{
- typedef typename T::L __restrict__ r;// { dg-error "'__restrict__' qualifiers cannot" "" }
+ typedef typename T::L __restrict__ r;// { dg-error "'__restrict__' qualifiers cannot" }
typedef typename T::myT __restrict__ p;
// The following are DR 295 dependent
myconst b;
};
-B1<AS> b1; // { dg-message "required" "" }
+B1<AS> b1; // { dg-message "required" }
B2<AS> b2;
template <class T>
class List { };
- vector<class List> data; // { dg-error "invalid|required|ISO C" "" }
+ vector<class List> data; // { dg-error "invalid|required|ISO C" }
};
template <class T>
// This next line should just do a lookup of 'class List', and then
// get a type/value mismatch. Instead we try and push 'class List'
// into the global namespace and get a redeclaration error.
-vector<class List > data; // { dg-error "invalid|required|declaration" "" }
+vector<class List > data; // { dg-error "invalid|required|declaration" }
static void f (int A::* pmi) { }
-int main () { f (null); } // { dg-error "cannot convert" "" }
+int main () { f (null); } // { dg-error "cannot convert" }
Foo3 (&Baz);
- Foo3 (&Baz, &Baz); // { dg-error "no matching function" "" }
+ Foo3 (&Baz, &Baz); // { dg-error "no matching function" }
// { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
}
int main()
{
Foo (f);
- Baz (f); // { dg-error "no matching function" "" }
+ Baz (f); // { dg-error "no matching function" }
// { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
}
template <class T> void Foo(T i)
{
i++, i++;
- i, i++; // { dg-warning "left operand" "" }
- i++, i; // { dg-warning "right operand" "" }
+ i, i++; // { dg-warning "left operand" }
+ i++, i; // { dg-warning "right operand" }
for (;; --i, ++i)
;
}
{
E e;
e.bar ();
-} // { dg-message "note: file" "" }
+} // { dg-message "note: file" }
/* None of the following should pass. */
switch (x)
{
- case 1 >> -1: /* { dg-error "operand of shift" "" } */
- case -1 >> -1: /* { dg-error "operand of shift" "" } */
- case 1 << -1: /* { dg-error "operand of shift" "" } */
- case -1 << -1: /* { dg-error "operand of shift" "" } */
+ case 1 >> -1: /* { dg-error "operand of shift" } */
+ case -1 >> -1: /* { dg-error "operand of shift" } */
+ case 1 << -1: /* { dg-error "operand of shift" } */
+ case -1 << -1: /* { dg-error "operand of shift" } */
return 1;
}
return 0;
/* None of the following should pass. */
switch (x)
{
- case -1 >> 200: /* { dg-error "operand of shift" "" } */
- case 1 << 200: /* { dg-error "operand of shift" "" } */
+ case -1 >> 200: /* { dg-error "operand of shift" } */
+ case 1 << 200: /* { dg-error "operand of shift" } */
return 1;
}
return 0;
// { dg-options "-Wunused -O3" }
static const int i = 0;
-static void f() { } /* { dg-warning "defined but not used" "" } */
+static void f() { } /* { dg-warning "defined but not used" } */
static inline void g() { }
struct C1 {
// Only use in-charge ctor
- C1(int bi) {} // { dg-warning "unused parameter" "" }
+ C1(int bi) {} // { dg-warning "unused parameter" }
};
struct C2 {
// Only use base ctor
- C2(int bi) {} // { dg-warning "unused parameter" "" }
+ C2(int bi) {} // { dg-warning "unused parameter" }
};
struct D : C2
void foo()
{
if (false)
- if (int i=0) // { dg-warning "unused" "" }
- int j=0; // { dg-warning "unused" "" }
+ if (int i=0) // { dg-warning "unused" }
+ int j=0; // { dg-warning "unused" }
}
typedef int INT1 __attribute__((deprecated("Please avoid INT1")));
typedef INT1 INT2 __attribute__ ((__deprecated__("Please avoid INT2")));
-typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
-INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated("Please avoid f1")));
-INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
INT2 f3(void) __attribute__ ((__deprecated__("Please avoid f3")));
-INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated: Please avoid INT2" "" } */
-int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated: Please avoid INT2" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" } */
int f6(INT2 x) __attribute__ ((__deprecated__("Please avoid f6")));
typedef enum Color {red, green, blue} Color __attribute__((deprecated("Please avoid Color")));
int g1;
int g2 __attribute__ ((deprecated("Please avoid g2")));
int g3 __attribute__ ((__deprecated__("Please avoid g3")));
-Color k; /* { dg-warning "'Color' is deprecated: Please avoid Color" "" } */
+Color k; /* { dg-warning "'Color' is deprecated: Please avoid Color" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
int x __attribute__ ((deprecated("Please avoid x")));
int y __attribute__ ((__deprecated__("Please avoid y")));
int z;
- int (*pf)() = f1; /* { dg-warning "'INT1 f1\\(\\)' is deprecated: Please avoid f1" "" } */
+ int (*pf)() = f1; /* { dg-warning "'INT1 f1\\(\\)' is deprecated: Please avoid f1" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated: Please avoid x" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated: Please avoid x" } */
/* { dg-warning "'y' is deprecated: Please avoid y" "y" { target *-*-* } .-1 } */
/* { dg-warning "'g2' is deprecated: Please avoid g2" "g2" { target *-*-* } .-2 } */
/* { dg-warning "'g3' is deprecated: Please avoid g3" "g3" { target *-*-* } .-3 } */
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "'S1::field2' is deprecated: Please avoid field2" "" } */
- else if (lp.field4) /* { dg-warning "'S1::field4' is deprecated: Please avoid field4" "" } */
+ return p->field2; /* { dg-warning "'S1::field2' is deprecated: Please avoid field2" } */
+ else if (lp.field4) /* { dg-warning "'S1::field4' is deprecated: Please avoid field4" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "'S1::u2' is deprecated: Please avoid u2" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "'S1::<unnamed union>::field6' is deprecated: Please avoid field6" "" } */
+ p->u2.field9; /* { dg-warning "'S1::u2' is deprecated: Please avoid u2" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'S1::<unnamed union>::field6' is deprecated: Please avoid field6" } */
/* { dg-warning "'S1::field8' is deprecated: Please avoid field8" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
} __attribute__ ((deprecated("Please avoid SS1")));
-struct SS1 *p1; /* { dg-warning "'SS1' is deprecated: Please avoid SS1" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated: Please avoid SS1" } */
struct __attribute__ ((__deprecated__("Please avoid SS2"))) SS2 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
};
-struct SS2 *p2; /* { dg-warning "'SS2' is deprecated: Please avoid SS2" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated: Please avoid SS2" } */
class T {
public:
void member1(int) __attribute__ ((deprecated("Please avoid member1")));
- void member2(INT1) __attribute__ ((__deprecated__("Please avoid member2"))); /* { dg-warning "'INT1' is deprecated" "" } */
+ void member2(INT1) __attribute__ ((__deprecated__("Please avoid member2"))); /* { dg-warning "'INT1' is deprecated" } */
int member3(T *);
int x;
} __attribute__ ((deprecated("Please avoid T")));
int T::member3(T *p) // { dg-warning "'T' is deprecated: Please avoid T" }
{
- p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" "" } */
- (*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" "" } */
- p->member2(1); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated: Please avoid member2" "" } */
- (*p).member2(2); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated: Please avoid member2" "" } */
+ p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" } */
+ (*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated: Please avoid member1" } */
+ p->member2(1); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated: Please avoid member2" } */
+ (*p).member2(2); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated: Please avoid member2" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated: Please avoid f1" "" } */
+ return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated: Please avoid f1" } */
}
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
-typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" } */
typedef INT1 INT1b __attribute__ ((deprecated));
-INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated));
-INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" } */
INT2 f3(void) __attribute__ ((__deprecated__));
-INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" "" } */
-int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" } */
int f6(INT2 x) __attribute__ ((__deprecated__));
typedef enum Color {red, green, blue} Color __attribute__((deprecated));
int g1;
int g2 __attribute__ ((deprecated));
int g3 __attribute__ ((__deprecated__));
-Color k; /* { dg-warning "'Color' is deprecated" "" } */
+Color k; /* { dg-warning "'Color' is deprecated" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated" } */
int x __attribute__ ((deprecated));
int y __attribute__ ((__deprecated__));
int z;
- int (*pf)() = f1; /* { dg-warning "'INT1 f1\\(\\)' is deprecated" "" } */
+ int (*pf)() = f1; /* { dg-warning "'INT1 f1\\(\\)' is deprecated" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" } */
/* { dg-warning "'y' is deprecated" "y" { target *-*-* } .-1 } */
/* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } .-2 } */
/* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } .-3 } */
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "'S1::field2' is deprecated" "" } */
- else if (lp.field4) /* { dg-warning "'S1::field4' is deprecated" "" } */
+ return p->field2; /* { dg-warning "'S1::field2' is deprecated" } */
+ else if (lp.field4) /* { dg-warning "'S1::field4' is deprecated" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "'S1::u2' is deprecated" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "'S1::<unnamed union>::field6' is deprecated" "" } */
+ p->u2.field9; /* { dg-warning "'S1::u2' is deprecated" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'S1::<unnamed union>::field6' is deprecated" } */
/* { dg-warning "'S1::field8' is deprecated" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" } */
} __attribute__ ((deprecated));
-struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" } */
struct __attribute__ ((__deprecated__)) SS2 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" } */
};
-struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" } */
#endif
#ifdef __cplusplus
class T {
public:
void member1(int) __attribute__ ((deprecated));
- void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "'INT1' is deprecated" "" } */
+ void member2(INT1) __attribute__ ((__deprecated__)); /* { dg-warning "'INT1' is deprecated" } */
int member3(T *);
int x;
} __attribute__ ((deprecated));
int T::member3(T *p) // { dg-warning "'T' is deprecated" }
{
- p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" "" } */
- (*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" "" } */
- p->member2(1); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated" "" } */
- (*p).member2(2); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated" "" } */
+ p->member1(1); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" } */
+ (*p).member1(2); /* { dg-warning "'void T::member1\\(int\\)' is deprecated" } */
+ p->member2(1); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated" } */
+ (*p).member2(2); /* { dg-warning "'void T::member2\\(INT1\\)' is deprecated" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated" "" } */
+ return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated" } */
}
#endif
{
public:
A & operator+=( int );
- A & operator+( int ); // { dg-warning ".* should return by value" "" }
+ A & operator+( int ); // { dg-warning ".* should return by value" }
A operator+=( float );
A operator+( float );
};
// We should emit a warning for these
-struct C1 { // { dg-warning "" "" }
+struct C1 { // { dg-warning "" }
int *ptr;
C1();
~C1();
};
-struct C2 { // { dg-warning "" "" }
+struct C2 { // { dg-warning "" }
int *ptr;
C2();
C2(const C2&);
~C2();
};
-struct C3 { // { dg-warning "" "" }
+struct C3 { // { dg-warning "" }
int *ptr;
C3();
~C3();
// (But the deletion does not constitute an ill-formed program. So the
// program should nevertheless compile, but it should give a warning.)
-class A; // { dg-message "forward declaration of 'class A'" "" }
+class A; // { dg-message "forward declaration of 'class A'" }
-A *a; // { dg-warning "'a' has incomplete type" "" }
+A *a; // { dg-warning "'a' has incomplete type" }
int
main (int argc, char **argv)
// PR 4803. Used inline functions must have a definition.
-inline void Foo1 (); // { dg-warning "inline function" "" }
+inline void Foo1 (); // { dg-warning "inline function" }
inline void Bar1 ();
-template <typename T> inline void Foo2(T); // { dg-warning "inline function" "" }
+template <typename T> inline void Foo2(T); // { dg-warning "inline function" }
template <typename T> inline void Bar2(T);
void Baz ()
extern "C" void FormatDisk();
template <class T>
struct C {
- C(){ FormatDisk(), 0; } // { dg-warning "right operand of comma" "" }
+ C(){ FormatDisk(), 0; } // { dg-warning "right operand of comma" }
};
template struct C<int>; // { dg-message "required" }
template <class T>
- void f() { FormatDisk(), 0; } // { dg-warning "right operand of comma" "" }
+ void f() { FormatDisk(), 0; } // { dg-warning "right operand of comma" }
template void f<int> (); // { dg-message "required" }
-void g() { FormatDisk(), 0; } // { dg-warning "right operand of comma" "" }
+void g() { FormatDisk(), 0; } // { dg-warning "right operand of comma" }
reinterpret_cast<int> (x.Foo ()); // { dg-error "invalid cast" }
const_cast<X &> (x.Foo ()); // { dg-warning "not used" }
- reinterpret_cast<int *> (&x);// { dg-warning "no effect" "" }
- const_cast<X &> (x); // { dg-warning "no effect" "" }
- sizeof (x++); // { dg-warning "no effect" "" }
- __alignof__ (x++); // { dg-warning "no effect" "" }
+ reinterpret_cast<int *> (&x);// { dg-warning "no effect" }
+ const_cast<X &> (x); // { dg-warning "no effect" }
+ sizeof (x++); // { dg-warning "no effect" }
+ __alignof__ (x++); // { dg-warning "no effect" }
}
template void Foo<4> (X&); // { dg-message "required" }
void foo ()
{
int i;
- float f = (float)i; // { dg-warning "use of old-style cast" "" }
+ float f = (float)i; // { dg-warning "use of old-style cast" }
(void)i;
}
void f()
{
- ex (1, 0); /* { dg-warning "missing sentinel in function call" "" } */
- ex (1, 0L); /* { dg-warning "missing sentinel in function call" "" } */
+ ex (1, 0); /* { dg-warning "missing sentinel in function call" } */
+ ex (1, 0L); /* { dg-warning "missing sentinel in function call" } */
ex (1, (void *)0);
ex (1, __null); /* { dg-bogus "sentinel" } */
}
int sys_msgctl (void)
{
struct a setbuf;
- return setbuf.mode; /* { dg-warning "'setbuf.a::mode' is used" "" } */
+ return setbuf.mode; /* { dg-warning "'setbuf.a::mode' is used" } */
}
static T value_AC;
};
template <typename T> T B<T>::valueA_AA;
-template <typename T> T B<T>::valueA_AC;// { dg-message "" "" } private -
-template <typename T> T B<T>::value_AC; // { dg-bogus "" "" } -
+template <typename T> T B<T>::valueA_AC;// { dg-message "" } private -
+template <typename T> T B<T>::value_AC; // { dg-bogus "" } -
// this one is a friend
template <class T> struct A<T>::AA
{
T M ()
{
- return B<T>::valueA_AC; // { dg-error "" "" } within this context -
+ return B<T>::valueA_AC; // { dg-error "" } within this context -
}
};
{
int M ()
{
- return B<int>::value_AC; // { dg-bogus "" "" } -
+ return B<int>::value_AC; // { dg-bogus "" } -
}
};
void operator*(baz&, double);
template <class T> inline T operator*(double s, const T &p)
- ; // { dg-bogus "" "" } - must have argument of class type -
+ ; // { dg-bogus "" } - must have argument of class type -
void m(baz& a) { a * .5; }
{
"BookName",
{
- { 1, "PName0" }, /* { dg-warning "(excess elements)|(near initialization)" "" } */
+ { 1, "PName0" }, /* { dg-warning "(excess elements)|(near initialization)" } */
}
};
int * f( int a)
{
- return &a;/* { dg-warning "address" "" } */
+ return &a;/* { dg-warning "address" } */
}
int * g()
{
int b = 0;
- return &b;/* { dg-warning "address" "" } */
+ return &b;/* { dg-warning "address" } */
}
struct ll
int *h(struct ll c)
{
- return &c.i;/* { dg-warning "address" "" } */
+ return &c.i;/* { dg-warning "address" } */
}
int *i()
{
- return &d.i;/* { dg-bogus "address" "" } */
+ return &d.i;/* { dg-bogus "address" } */
}
int *j(struct ll *c)
{
- return &c->i; /* { dg-bogus "address" "" } */
+ return &c->i; /* { dg-bogus "address" } */
}
{
p = "";
if (p[0] == 0
- || (p[0] == '_' && p[1] == 0)) /* { dg-bogus "array bounds" "" } */
+ || (p[0] == '_' && p[1] == 0)) /* { dg-bogus "array bounds" } */
return 0;
return 1;
}
addSibMacro(
YYSTYPE list )
{
- tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer will" "" }
+ tDefEntry** ppT = (tDefEntry**)&list; // { dg-warning "type-punned pointer will" }
- struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" "" }
+ struct incomplete *p = (struct incomplete *)&list; // { dg-warning "type-punning to incomplete" }
return list;
}
/* { dg-do compile } */
/* { dg-require-alias "" } */
/* { dg-options "-O2" } */
-static void f (void) __attribute__((alias("f"))); // { dg-error "part of alias cycle" "" }
+static void f (void) __attribute__((alias("f"))); // { dg-error "part of alias cycle" }
void g ()
{
/* { dg-do compile } */
/* { dg-require-alias "" } */
/* { dg-options "-O2" } */
-static void f (void) __attribute__((alias("g"))); static void g (void) __attribute__((alias("f"))); // { dg-error "part of alias cycle" "" }
+static void f (void) __attribute__((alias("g"))); static void g (void) __attribute__((alias("f"))); // { dg-error "part of alias cycle" }
void h ()
{
int
sub1 (long long int foobar)
{
- struct foo *tmp = (struct foo *) &foobar; // { dg-warning "type-punned pointer will" "" }
+ struct foo *tmp = (struct foo *) &foobar; // { dg-warning "type-punned pointer will" }
return tmp->i;
}
static struct f f = { 4, { 0, 1, 2, 3 } };
static int junk1[] = { -1, -1, -1, -1 };
-static struct g g = { 4, { 0, 1, 2, 3 } }; /* { dg-warning "(excess elements)|(near initialization)" "" } */
+static struct g g = { 4, { 0, 1, 2, 3 } }; /* { dg-warning "(excess elements)|(near initialization)" } */
static int junk2[] = { -1, -1, -1, -1 };
int main()
static struct f f = { 4, { 0, 1, 2, 3 } };
static int junk1[] = { -1, -1, -1, -1 };
-static struct g g = { 4, { 0, 1, 2, 3 } }; /* { dg-warning "(excess elements)|(near initialization)" "" } */
+static struct g g = { 4, { 0, 1, 2, 3 } }; /* { dg-warning "(excess elements)|(near initialization)" } */
static int junk2[] = { -1, -1, -1, -1 };
int main()
extern int magic (void) /* { dg-message "previous definition" } */
__attribute__ ((ifunc ("resolver")));
-extern int magic (void) /* { dg-error "redefinition" "" } */
+extern int magic (void) /* { dg-error "redefinition" } */
__attribute__ ((alias ("resolver")));
extern int spell (void) /* { dg-message "previous definition" } */
{
return 0;
}
-extern int spell (void) /* { dg-error "redefinition" "" } */
+extern int spell (void) /* { dg-error "redefinition" } */
__attribute__ ((ifunc ("resolver")));
extern int mantra (void) /* { dg-message "previous definition" } */
__attribute__ ((alias ("resolver")));
-extern int mantra (void) /* { dg-error "redefinition" "" } */
+extern int mantra (void) /* { dg-error "redefinition" } */
__attribute__ ((ifunc ("resolver")));
-extern int saying (void) /* { dg-error "weak .* cannot be defined" "" } */
+extern int saying (void) /* { dg-error "weak .* cannot be defined" } */
__attribute__ ((weak,ifunc ("resolver")));
-extern int maxim (void) /* { dg-error "indirect function .* cannot be declared weak" "" } */
+extern int maxim (void) /* { dg-error "indirect function .* cannot be declared weak" } */
__attribute__ ((ifunc ("resolver"),weak));
#define AT noinline
-typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" } */
-typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" } */
struct ATSYM(struct) {
- char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
-} ATTR; /* { dg-warning "does not apply to types" "" } */
+ char dummy ATTR; /* { dg-warning "attribute ignored" } */
+} ATTR; /* { dg-warning "does not apply to types" } */
-int ATSYM(var) ATTR; /* { dg-warning "attribute ignored" "" } */
+int ATSYM(var) ATTR; /* { dg-warning "attribute ignored" } */
int ATSYM(fn_knrarg) (arg)
- int arg ATTR; /* { dg-warning "attribute ignored" "" } */
+ int arg ATTR; /* { dg-warning "attribute ignored" } */
{ return 0; }
-int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
+int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" } */
int ATSYM(fn_vars) (void) {
- static int svar ATTR; /* { dg-warning "attribute ignored" "" } */
- auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */
+ static int svar ATTR; /* { dg-warning "attribute ignored" } */
+ auto int lvar ATTR; /* { dg-warning "attribute ignored" } */
return 0;
}
longer ignored. */
struct ATSYM(struct) {
- char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
-} ATTR; /* { dg-warning "does not apply to types" "" } */
+ char dummy ATTR; /* { dg-warning "attribute ignored" } */
+} ATTR; /* { dg-warning "does not apply to types" } */
int ATSYM(var) ATTR;
int ATSYM(fn_knrarg) (arg)
- int arg ATTR; /* { dg-warning "attribute ignored" "" } */
+ int arg ATTR; /* { dg-warning "attribute ignored" } */
{ return 0; }
-int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
+int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" } */
int ATSYM(fn_vars) (void) {
static int svar ATTR;
- auto int lvar ATTR; /* { dg-warning "attribute ignored" "" } */
+ auto int lvar ATTR; /* { dg-warning "attribute ignored" } */
return 0;
}
#undef AT
#define AT weak
-typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" } */
-typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" } */
struct ATSYM(struct) {
- char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
+ char dummy ATTR; /* { dg-warning "attribute ignored" } */
};
int ATSYM(fn_knrarg) (arg)
- int arg ATTR; /* { dg-warning "attribute ignored" "" } */
+ int arg ATTR; /* { dg-warning "attribute ignored" } */
{ return 0; }
-int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" "" } */
+int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute ignored" } */
/* PR target/28648 */
#undef AT
#define AT dllimport
-typedef int ATSYM(type) ATTR; /* { dg-warning "attribute |directive ignored" "" } */
+typedef int ATSYM(type) ATTR; /* { dg-warning "attribute |directive ignored" } */
-typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute |directive ignored" "" } */
+typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute |directive ignored" } */
struct ATSYM(struct) {
- char dummy ATTR; /* { dg-warning "attribute |directive ignored" "" } */
+ char dummy ATTR; /* { dg-warning "attribute |directive ignored" } */
};
int ATSYM(fn_knrarg) (arg)
- int arg ATTR; /* { dg-warning "attribute |directive ignored" "" } */
+ int arg ATTR; /* { dg-warning "attribute |directive ignored" } */
{ return 0; }
-int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute |directive ignored" "" } */
+int ATSYM(fn_isoarg) (int arg ATTR) { return 0; } /* { dg-warning "attribute |directive ignored" } */
extern int t();
-static inline void __attribute__((__noinline__)) function_definition(void) {t();} /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
+static inline void __attribute__((__noinline__)) function_definition(void) {t();} /* { dg-warning "inline function \[^\n\]* given attribute noinline" } */
-static inline void __attribute__((__noinline__)) function_declaration_both_before(void); /* { dg-warning "inline function \[^\n\]* given attribute noinline" "" } */
+static inline void __attribute__((__noinline__)) function_declaration_both_before(void); /* { dg-warning "inline function \[^\n\]* given attribute noinline" } */
static void function_declaration_both_before(void) {t();}
static void function_declaration_both_after(void);
-static inline void __attribute__((__noinline__)) function_declaration_both_after(void); /* { dg-warning "(inline function \[^\n\]* given attribute noinline|declared inline after its definition)" "" } */
+static inline void __attribute__((__noinline__)) function_declaration_both_after(void); /* { dg-warning "(inline function \[^\n\]* given attribute noinline|declared inline after its definition)" } */
static void function_declaration_both_after(void) {t();}
-static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" "" } */
+static void function_declaration_noinline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" } */
-static inline void function_declaration_noinline_before(void) {t();} /* { dg-warning "follows declaration with attribute noinline" "" } */
+static inline void function_declaration_noinline_before(void) {t();} /* { dg-warning "follows declaration with attribute noinline" } */
-static inline void function_declaration_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */
+static inline void function_declaration_noinline_after(void) {t();} /* { dg-message "note: previous definition" } */
-static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
+static void function_declaration_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" } */
-static inline void function_declaration_inline_before(void); /* { dg-message "note: previous declaration" "" } */
+static inline void function_declaration_inline_before(void); /* { dg-message "note: previous declaration" } */
-static void __attribute__((__noinline__)) function_declaration_inline_before(void) {t();} /* { dg-warning "follows inline declaration" "" } */
+static void __attribute__((__noinline__)) function_declaration_inline_before(void) {t();} /* { dg-warning "follows inline declaration" } */
-static inline void function_declaration_inline_noinline_before(void); /* { dg-message "note: previous declaration" "" } */
+static inline void function_declaration_inline_noinline_before(void); /* { dg-message "note: previous declaration" } */
-static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
+static void function_declaration_inline_noinline_before(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" } */
static void function_declaration_inline_noinline_before(void) {t();}
static inline void function_declaration_inline_noinline_after(void);
-static void function_declaration_inline_noinline_after(void) {t();} /* { dg-message "note: previous definition" "" } */
+static void function_declaration_inline_noinline_after(void) {t();} /* { dg-message "note: previous definition" } */
-static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" "" } */
+static void function_declaration_inline_noinline_after(void) __attribute__((__noinline__)); /* { dg-warning "follows inline declaration" } */
-static void function_declaration_noinline_inline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" "" } */
+static void function_declaration_noinline_inline_before(void) __attribute__((__noinline__)); /* { dg-message "note: previous declaration" } */
-static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "follows declaration with attribute noinline" "" } */
+static inline void function_declaration_noinline_inline_before(void); /* { dg-warning "follows declaration with attribute noinline" } */
static void function_declaration_noinline_inline_before(void) {t();}
int b: 2;
};
-struct bf p = {4, 0}; /* { dg-warning "truncated" "" } */
-struct bf q = {0, 2}; /* { dg-warning "overflow" "" } */
+struct bf p = {4, 0}; /* { dg-warning "truncated" } */
+struct bf q = {0, 2}; /* { dg-warning "overflow" } */
struct bf r = {3, -2}; /* { dg-bogus "(truncated|overflow)" } */
void foo ()
{
- p.a = 4, p.b = 0; /* { dg-warning "truncated" "" } */
- q.a = 0, q.b = 2; /* { dg-warning "overflow" "" } */
+ p.a = 4, p.b = 0; /* { dg-warning "truncated" } */
+ q.a = 0, q.b = 2; /* { dg-warning "overflow" } */
r.a = 3, r.b = -2; /* { dg-bogus "(truncated|overflow)" } */
}
int a = DBL_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
-int b = (int) DBL_MAX; /* { dg-error "overflow" "" } */
+int b = (int) DBL_MAX; /* { dg-error "overflow" } */
unsigned int c = -1.0; /* { dg-warning "overflow in implicit constant conversion" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
unsigned int d = (unsigned)-1.0; /* { dg-error "overflow" } */
int a = DBL_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
-int b = (int) DBL_MAX; /* { dg-error "overflow" "" } */
+int b = (int) DBL_MAX; /* { dg-error "overflow" } */
unsigned int c = -1.0; /* { dg-warning "overflow in implicit constant conversion" } */
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
unsigned int d = (unsigned)-1.0; /* { dg-error "overflow" } */
{
goto socket;
- ENTRY(socket) /* { dg-error "valid preprocessing token" "" } */
+ ENTRY(socket) /* { dg-error "valid preprocessing token" } */
return 0;
}
# error Charconst incorrectly sign-extended
#endif
-#if LONG_CHARCONST != SHORT_CHARCONST /* { dg-warning "too long" "" } */
+#if LONG_CHARCONST != SHORT_CHARCONST /* { dg-warning "too long" } */
# error Overly long charconst truncates wrongly for preprocessor
#endif
{
if (POS_CHARCONST < 0)
abort ();
- if (LONG_CHARCONST != SHORT_CHARCONST) /* { dg-warning "too long" "" } */
+ if (LONG_CHARCONST != SHORT_CHARCONST) /* { dg-warning "too long" } */
abort ();
return 0;
}
/* Source: Neil Booth, 4 Nov 2000. */
-#include <silly\>> /* { dg-error "extra tokens" "" } */
+#include <silly\>> /* { dg-error "extra tokens" } */
/* These error is No such file or directory, just once. However, this
message is locale-dependent, so don't test for it. */
/* Source: Neil Booth, 4 Nov 2000. */
-#include "silly\"" /* { dg-error "extra tokens" "" } */
+#include "silly\"" /* { dg-error "extra tokens" } */
/* These error is No such file or directory, just once. However, this
message is locale-dependent, so don't test for it. */
/* Redeclaration of parameters is an error. PR 13728. */
/* { dg-do compile } */
-void f (int fred, /* { dg-message "note: previous definition" "" } */
- int fred); /* { dg-error "redefinition of parameter" "" } */
+void f (int fred, /* { dg-message "note: previous definition" } */
+ int fred); /* { dg-error "redefinition of parameter" } */
-void f2 (int fred, /* { dg-message "note: previous definition" "" } */
- int fred) /* { dg-error "redefinition of parameter" "" } */
+void f2 (int fred, /* { dg-message "note: previous definition" } */
+ int fred) /* { dg-error "redefinition of parameter" } */
{
}
typedef int INT1 __attribute__((deprecated("Please avoid INT1")));
typedef INT1 INT2 __attribute__ ((__deprecated__("Please avoid INT2")));
-typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
typedef INT1 INT1b __attribute__ ((deprecated("Please avoid INT1b")));
-INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated("Please avoid f1")));
-INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
INT2 f3(void) __attribute__ ((__deprecated__("Please avoid f3")));
-INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated: Please avoid INT2" "" } */
-int f5(INT2 x); /* { dg-warning "'INT2' is deprecated: Please avoid INT2" "" } */
-int f6(INT2 x) __attribute__ ((__deprecated__("Please avoid f6"))); /* { dg-warning "'INT2' is deprecated: Please avoid INT2" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated: Please avoid INT2" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated: Please avoid INT2" } */
+int f6(INT2 x) __attribute__ ((__deprecated__("Please avoid f6"))); /* { dg-warning "'INT2' is deprecated: Please avoid INT2" } */
typedef enum {red, green, blue} Color __attribute__((deprecated("Please avoid Color")));
int g1;
int g2 __attribute__ ((deprecated("Please avoid g2")));
int g3 __attribute__ ((__deprecated__("Please avoid g3")));
-Color k; /* { dg-warning "'Color' is deprecated: Please avoid Color" "" } */
+Color k; /* { dg-warning "'Color' is deprecated: Please avoid Color" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
int x __attribute__ ((deprecated("Avoid x")));
int y __attribute__ ((__deprecated__("Bad y")));
int z;
- int (*pf)() = f1; /* { dg-warning "'f1' is deprecated: Please avoid f1" "" } */
+ int (*pf)() = f1; /* { dg-warning "'f1' is deprecated: Please avoid f1" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated: Avoid x" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated: Avoid x" } */
/* { dg-warning "'y' is deprecated: Bad y" "y" { target *-*-* } .-1 } */
/* { dg-warning "'g2' is deprecated: Please avoid g2" "g2" { target *-*-* } .-2 } */
/* { dg-warning "'g3' is deprecated: Please avoid g3" "g3" { target *-*-* } .-3 } */
- return f1(); /* { dg-warning "'f1' is deprecated: Please avoid f1" "" } */
+ return f1(); /* { dg-warning "'f1' is deprecated: Please avoid f1" } */
}
int func2(S1 *p)
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "'field2' is deprecated: Please avoid field2" "" } */
- else if (lp.field4) /* { dg-warning "'field4' is deprecated: Please avoid field4" "" } */
+ return p->field2; /* { dg-warning "'field2' is deprecated: Please avoid field2" } */
+ else if (lp.field4) /* { dg-warning "'field4' is deprecated: Please avoid field4" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "'u2' is deprecated: Please avoid u2" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated: Please avoid field6" "" } */
+ p->u2.field9; /* { dg-warning "'u2' is deprecated: Please avoid u2" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated: Please avoid field6" } */
/* { dg-warning "'field8' is deprecated: Please avoid field8" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
} __attribute__ ((deprecated("Please avoid SS1")));
-struct SS1 *p1; /* { dg-warning "'SS1' is deprecated: Please avoid SS1" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated: Please avoid SS1" } */
struct __attribute__ ((__deprecated__("Please avoid SS2"))) SS2 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated: Please avoid INT1" } */
};
-struct SS2 *p2; /* { dg-warning "'SS2' is deprecated: Please avoid SS2" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated: Please avoid SS2" } */
typedef int INT1 __attribute__((deprecated));
typedef INT1 INT2 __attribute__ ((__deprecated__));
-typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" "" } */
+typedef INT1 INT1a; /* { dg-warning "'INT1' is deprecated" } */
typedef INT1 INT1b __attribute__ ((deprecated));
-INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" "" } */
+INT1 should_be_unavailable; /* { dg-warning "'INT1' is deprecated" } */
INT1a should_not_be_deprecated;
INT1 f1(void) __attribute__ ((deprecated));
-INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" "" } */
+INT1 f2(void) { return 0; } /* { dg-warning "'INT1' is deprecated" } */
INT2 f3(void) __attribute__ ((__deprecated__));
-INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" "" } */
-int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" "" } */
-int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "'INT2' is deprecated" "" } */
+INT2 f4(void) { return 0; } /* { dg-warning "'INT2' is deprecated" } */
+int f5(INT2 x); /* { dg-warning "'INT2' is deprecated" } */
+int f6(INT2 x) __attribute__ ((__deprecated__)); /* { dg-warning "'INT2' is deprecated" } */
typedef enum {red, green, blue} Color __attribute__((deprecated));
int g1;
int g2 __attribute__ ((deprecated));
int g3 __attribute__ ((__deprecated__));
-Color k; /* { dg-warning "'Color' is deprecated" "" } */
+Color k; /* { dg-warning "'Color' is deprecated" } */
typedef struct {
int field1;
int func1()
{
- INT1 w; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 w; /* { dg-warning "'INT1' is deprecated" } */
int x __attribute__ ((deprecated));
int y __attribute__ ((__deprecated__));
int z;
- int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
+ int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" } */
- z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
+ z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" } */
/* { dg-warning "'y' is deprecated" "y" { target *-*-* } .-1 } */
/* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } .-2 } */
/* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } .-3 } */
S1 lp;
if (p->field1)
- return p->field2; /* { dg-warning "'field2' is deprecated" "" } */
- else if (lp.field4) /* { dg-warning "'field4' is deprecated" "" } */
+ return p->field2; /* { dg-warning "'field2' is deprecated" } */
+ else if (lp.field4) /* { dg-warning "'field4' is deprecated" } */
return p->field3;
p->u1.field5 = g1 + p->field7;
- p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */
- return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */
+ p->u2.field9; /* { dg-warning "'u2' is deprecated" } */
+ return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" } */
/* { dg-warning "'field8' is deprecated" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" } */
} __attribute__ ((deprecated));
-struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" "" } */
+struct SS1 *p1; /* { dg-warning "'SS1' is deprecated" } */
struct __attribute__ ((__deprecated__)) SS2 {
int x;
- INT1 y; /* { dg-warning "'INT1' is deprecated" "" } */
+ INT1 y; /* { dg-warning "'INT1' is deprecated" } */
};
-struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" "" } */
+struct SS2 *p2; /* { dg-warning "'SS2' is deprecated" } */
#endif
#ifdef __cplusplus
int T::member2(T *p)
{
- p->member1(1); /* { xxdg-warning "'member1' is deprecated" "" } */
- (*p).member1(2); /* { xxdg-warning "'member1' is deprecated" "" } */
- p->member2(1); /* { xxdg-warning "'member2' is deprecated" "" } */
- (*p).member2(2); /* { xxdg-warning "'member2' is deprecated" "" } */
+ p->member1(1); /* { xxdg-warning "'member1' is deprecated" } */
+ (*p).member1(2); /* { xxdg-warning "'member1' is deprecated" } */
+ p->member2(1); /* { xxdg-warning "'member2' is deprecated" } */
+ (*p).member2(2); /* { xxdg-warning "'member2' is deprecated" } */
p->member3(p);
(*p).member3(p);
- return f1(); /* { xxdg-warning "'f1' is deprecated" "" } */
+ return f1(); /* { xxdg-warning "'f1' is deprecated" } */
}
#endif
/* GNU extension: PowerPC AltiVec Built-in Functions.
These should be rejected as invalid AltiVec types. */
-__vector _Decimal32 vd32; /* { dg-error "AltiVec types" "" } */
-__vector _Decimal64 vd64; /* { dg-error "AltiVec types" "" } */
-__vector _Decimal128 vd128; /* { dg-error "AltiVec types" "" } */
+__vector _Decimal32 vd32; /* { dg-error "AltiVec types" } */
+__vector _Decimal64 vd64; /* { dg-error "AltiVec types" } */
+__vector _Decimal128 vd128; /* { dg-error "AltiVec types" } */
void
f (void)
{
- float a = 1e+100000000f; /* { dg-warning "floating constant exceeds range of 'float'" "" } */
+ float a = 1e+100000000f; /* { dg-warning "floating constant exceeds range of 'float'" } */
double b = 1e+100000000; /* { dg-warning "floating constant exceeds range of 'double'" } */
long double c = 1e+100000000l; /* { dg-warning "floating constant exceeds range of 'long double'" } */
}
int ary3[sizeof (struct p1) == sizeof (struct p2) ? 1 : -1];
/* not ok */
-typedef struct u1 __attribute__ ((packed)) u1_t1; /* { dg-warning "attribute ignored" "" }*/
-typedef struct u1 u1_t2 __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" }*/
+typedef struct u1 __attribute__ ((packed)) u1_t1; /* { dg-warning "attribute ignored" }*/
+typedef struct u1 u1_t2 __attribute__ ((packed)); /* { dg-warning "attribute ignored" }*/
typedef struct p3 {
char field1;
short field2;
int field3;
-} p3_t1 __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" }*/
+} p3_t1 __attribute__ ((packed)); /* { dg-warning "attribute ignored" }*/
{
unsigned int a;
unsigned char b;
- for ( a = 0, b = 2; a > b * 100; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" "" } */
+ for ( a = 0, b = 2; a > b * 100; a++ ) /* { dg-bogus "comparison between signed and unsigned integer" } */
{ ; }
return 0;
static int b;
static int b;
-static int c; /* { dg-message "note: previous declaration" "" } */
+static int c; /* { dg-message "note: previous declaration" } */
int c; /* { dg-error "non-static" "correct error" } */
-static int d; /* { dg-message "note: previous declaration" "" } */
+static int d; /* { dg-message "note: previous declaration" } */
int d = 1; /* { dg-error "non-static" "correct error" } */
void foo (void) { extern int e = 1; } /* { dg-error "has both" "extern init in function" } */
xLoc = xIn = ~ (1 << i);
xExpect = ~ (xIn & 0x7F);
- xOut = __sync_nand_and_fetch (&xLoc, 0x7F); /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" } */
+ xOut = __sync_nand_and_fetch (&xLoc, 0x7F); /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" } */
if (xOut != xExpect)
abort ();
unsigned int *a[32], *o, i;
bar (a);
- for (i = 0; i <= sizeof (a) / sizeof (a[0]); i++) /* { dg-message "note: within this loop" "" } */
+ for (i = 0; i <= sizeof (a) / sizeof (a[0]); i++) /* { dg-message "note: within this loop" } */
{
- o = a[i]; /* { dg-warning "32 invokes undefined behavior" "" } */
+ o = a[i]; /* { dg-warning "32 invokes undefined behavior" } */
bar (o);
}
}
{
int a[16], b, c;
bar (a);
- for (b = a[c = 0]; c < 16; b = a[++c]) /* { dg-warning "15 invokes undefined behavior" "" } */
+ for (b = a[c = 0]; c < 16; b = a[++c]) /* { dg-warning "15 invokes undefined behavior" } */
baz (b);
}
if (!varseen)
varseen = 1;
- jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" "" } */
+ jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" } */
setjmp (*buf);
}
if (local_indent != 8)
{
setjmp (buf);
- bar (local_indent); /* { dg-bogus "may be used uninitialized" "" } */
+ bar (local_indent); /* { dg-bogus "may be used uninitialized" } */
}
}
foo (1);
/* Extern then static, both at file scope. */
-extern int test6(int); /* { dg-message "note: previous" "" } */
+extern int test6(int); /* { dg-message "note: previous" } */
static int test6(int x) /* { dg-error "follows non-static" } */
{ return x; }
void prime7(void)
{
- extern int test7(int); /* { dg-message "note: previous" "" } */
+ extern int test7(int); /* { dg-message "note: previous" } */
}
static int test7(int x) /* { dg-error "follows non-static" } */
void prime8(void)
{
- test8(); /* { dg-message "note: previous" "" } */
+ test8(); /* { dg-message "note: previous" } */
/* { dg-warning "implicit" "implicit" { target *-*-* } .-1 } */
}
abort ();
if (__sync_fetch_and_xor(AI+10, 9) != 0)
abort ();
- if (__sync_fetch_and_nand(AI+11, 7) != (char)-1) /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" } */
+ if (__sync_fetch_and_nand(AI+11, 7) != (char)-1) /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" } */
abort ();
if (__sync_add_and_fetch(AI+12, 1) != 1)
abort ();
if (__sync_xor_and_fetch(AI+16, 9) != 9)
abort ();
- if (__sync_nand_and_fetch(AI+17, 7) != (char)~7) /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" } */
+ if (__sync_nand_and_fetch(AI+17, 7) != (char)~7) /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" } */
abort ();
}
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
typedef int x, y;
-x y z; /* { dg-error "" "" } */
+x y z; /* { dg-error "" } */
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
typedef int x, y;
-x struct f z; /* { dg-error "two or more " "" } */
+x struct f z; /* { dg-error "two or more " } */
{
struct f {
}
- int z; /* { dg-error "expected ';', identifier or " "" } */
+ int z; /* { dg-error "expected ';', identifier or " } */
}
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
struct f {}
-struct g {} /* { dg-error "expected ';', identifier or " "" } */
-int f(); /* { dg-error "expected ';', identifier or " "" } */
+struct g {} /* { dg-error "expected ';', identifier or " } */
+int f(); /* { dg-error "expected ';', identifier or " } */
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
struct s {
- struct f {} /* dg-warning "does not declare anything" "" } */
- struct g {} x; /* { dg-error "expected ';', identifier or " "" } */
+ struct f {} /* dg-warning "does not declare anything" } */
+ struct g {} x; /* { dg-error "expected ';', identifier or " } */
};
struct s {
struct f {}
- enum a { X } /* { dg-error "expected ';', identifier or " "" } */
- struct g {} /* { dg-error "expected identifier " "" } */
-}; /* { dg-warning "no semicolon" "" } */
+ enum a { X } /* { dg-error "expected ';', identifier or " } */
+ struct g {} /* { dg-error "expected identifier " } */
+}; /* { dg-warning "no semicolon" } */
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
enum x { XYZ }
-struct g { enum x a; }; /* { dg-error "expected ';', identifier or " "" } */
+struct g { enum x a; }; /* { dg-error "expected ';', identifier or " } */
int f(struct g *x)
{
- return x->a == XYZ; /* { dg-bogus " has no member " "" } */
+ return x->a == XYZ; /* { dg-bogus " has no member " } */
}
/* { dg-options "-std=gnu89" } // suppress default -pedantic-errors */
struct f {}
-static int a, b; /* { dg-error "expected ';', identifier or " "" } */
+static int a, b; /* { dg-error "expected ';', identifier or " } */
int f()
{
- return a - b; /* { dg-bogus "invalid operands " "" } */
+ return a - b; /* { dg-bogus "invalid operands " } */
}
int sys_msgctl (void)
{
struct { int mode; } setbuf;
- return setbuf.mode; /* { dg-warning "'setbuf\.mode' is used" "" } */
+ return setbuf.mode; /* { dg-warning "'setbuf\.mode' is used" } */
}
int main(void)
{
int i;
- printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" "" } */
+ printf("i = %d\n", i); /* { dg-warning "'i' is used uninitialized in this function" } */
frob(&i);
return 0;
extern int
__attribute__((visibility ("hidden")))
-xyzzy; /* { dg-message "note: previous declaration" "" } */
+xyzzy; /* { dg-message "note: previous declaration" } */
int
__attribute__((visibility ("protected")))
-xyzzy = 5; /* { dg-warning "different visibility" "" } */
+xyzzy = 5; /* { dg-warning "different visibility" } */
struct s { int a; };
-inline void f (x) /* { dg-warning "inlining .* mismatched arg" "" } */
+inline void f (x) /* { dg-warning "inlining .* mismatched arg" } */
int x;
{
asm ("");
/* { dg-do compile } */
/* { dg-options "-Winline -O2 -fgnu89-inline" } */
-inline int q(void); /* { dg-warning "body not available" "" } */
+inline int q(void); /* { dg-warning "body not available" } */
inline int t(void)
{
return q(); /* { dg-message "called from here" } */
/* { dg-options "-Winline -O2 --param max-inline-insns-single=1 --param inline-min-speedup=100 -fgnu89-inline" } */
void big (void);
-inline int q(void) /* { dg-warning "max-inline-insns-single" "" } */
+inline int q(void) /* { dg-warning "max-inline-insns-single" } */
{
big();
big();
test(t);
}
static inline
-int bb (void) /* { dg-warning "large-stack-frame" "" } */
+int bb (void) /* { dg-warning "large-stack-frame" } */
{
char t[100];
test(t);
int
main (void)
{
- register int reg asm ("esi") = 1; /* { dg-warning "might be clobbered" "" } */
+ register int reg asm ("esi") = 1; /* { dg-warning "might be clobbered" } */
if (!newsetjmp ())
{
int test (int *p)
{
p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int));
- return *(p + 1); /* { dg-warning "memory access check always fail" "" } */
+ return *(p + 1); /* { dg-warning "memory access check always fail" } */
}
#include <stdio.h>
-static int f1 () /* { dg-warning "function cannot be instrumented" "" } */
+static int f1 () /* { dg-warning "function cannot be instrumented" } */
{
static int array = &&label_B - &&label_A;
int test (struct S *ps)
{
int *pi = &ps->b;
- return *(pi + 1); /* { dg-warning "memory access check always fail" "" } */
+ return *(pi + 1); /* { dg-warning "memory access check always fail" } */
}
extern __m256i y;
void
-bar (__m256i x) /* { dg-warning "AVX" "" } */
+bar (__m256i x) /* { dg-warning "AVX" } */
{
y = x;
}
typedef double v2df __attribute__ ((vector_size (16)));
v2df p;
-void q(v2df t) /* { dg-warning "SSE" "" } */
+void q(v2df t) /* { dg-warning "SSE" } */
{
p=t;
}
/* These should be rejected as invalid AltiVec types. */
-__vector long long vll; /* { dg-error "AltiVec types" "" } */
-__vector unsigned long long vull; /* { dg-error "AltiVec types" "" } */
-__vector signed long long vsll; /* { dg-error "AltiVec types" "" } */
-__vector __bool long long vbll; /* { dg-error "AltiVec types" "" } */
-__vector long long int vlli; /* { dg-error "AltiVec types" "" } */
-__vector unsigned long long int vulli; /* { dg-error "AltiVec types" "" } */
-__vector signed long long int vslli; /* { dg-error "AltiVec types" "" } */
-__vector __bool long long int vblli; /* { dg-error "AltiVec types" "" } */
-__vector double vd1; /* { dg-error "AltiVec types" "" } */
-__vector long double vld; /* { dg-error "AltiVec types" "" } */
-__vector _Complex float vcf; /* { dg-error "AltiVec types" "" } */
-__vector _Complex double vcd; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long double vcld; /* { dg-error "AltiVec types" "" } */
-__vector _Complex signed char vcsc; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned char vcuc; /* { dg-error "AltiVec types" "" } */
-__vector _Complex short vcss; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned short vcus; /* { dg-error "AltiVec types" "" } */
-__vector _Complex int vcsi; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned int vcui; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long vcsl; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned long vcul; /* { dg-error "AltiVec types" "" } */
-__vector _Complex long long vcsll; /* { dg-error "AltiVec types" "" } */
-__vector _Complex unsigned long long vcull; /* { dg-error "AltiVec types" "" } */
-__vector __complex float v_cf; /* { dg-error "AltiVec types" "" } */
-__vector __complex double v_cd; /* { dg-error "AltiVec types" "" } */
-__vector __complex long double v_cld; /* { dg-error "AltiVec types" "" } */
-__vector __complex signed char v_csc; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned char v_cuc; /* { dg-error "AltiVec types" "" } */
-__vector __complex short v_css; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned short v_cus; /* { dg-error "AltiVec types" "" } */
-__vector __complex int v_csi; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned int v_cui; /* { dg-error "AltiVec types" "" } */
-__vector __complex long v_csl; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned long v_cul; /* { dg-error "AltiVec types" "" } */
-__vector __complex long long v_csll; /* { dg-error "AltiVec types" "" } */
-__vector __complex unsigned long long v_cull; /* { dg-error "AltiVec types" "" } */
+__vector long long vll; /* { dg-error "AltiVec types" } */
+__vector unsigned long long vull; /* { dg-error "AltiVec types" } */
+__vector signed long long vsll; /* { dg-error "AltiVec types" } */
+__vector __bool long long vbll; /* { dg-error "AltiVec types" } */
+__vector long long int vlli; /* { dg-error "AltiVec types" } */
+__vector unsigned long long int vulli; /* { dg-error "AltiVec types" } */
+__vector signed long long int vslli; /* { dg-error "AltiVec types" } */
+__vector __bool long long int vblli; /* { dg-error "AltiVec types" } */
+__vector double vd1; /* { dg-error "AltiVec types" } */
+__vector long double vld; /* { dg-error "AltiVec types" } */
+__vector _Complex float vcf; /* { dg-error "AltiVec types" } */
+__vector _Complex double vcd; /* { dg-error "AltiVec types" } */
+__vector _Complex long double vcld; /* { dg-error "AltiVec types" } */
+__vector _Complex signed char vcsc; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned char vcuc; /* { dg-error "AltiVec types" } */
+__vector _Complex short vcss; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned short vcus; /* { dg-error "AltiVec types" } */
+__vector _Complex int vcsi; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned int vcui; /* { dg-error "AltiVec types" } */
+__vector _Complex long vcsl; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned long vcul; /* { dg-error "AltiVec types" } */
+__vector _Complex long long vcsll; /* { dg-error "AltiVec types" } */
+__vector _Complex unsigned long long vcull; /* { dg-error "AltiVec types" } */
+__vector __complex float v_cf; /* { dg-error "AltiVec types" } */
+__vector __complex double v_cd; /* { dg-error "AltiVec types" } */
+__vector __complex long double v_cld; /* { dg-error "AltiVec types" } */
+__vector __complex signed char v_csc; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned char v_cuc; /* { dg-error "AltiVec types" } */
+__vector __complex short v_css; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned short v_cus; /* { dg-error "AltiVec types" } */
+__vector __complex int v_csi; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned int v_cui; /* { dg-error "AltiVec types" } */
+__vector __complex long v_csl; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned long v_cul; /* { dg-error "AltiVec types" } */
+__vector __complex long long v_csll; /* { dg-error "AltiVec types" } */
+__vector __complex unsigned long long v_cull; /* { dg-error "AltiVec types" } */
/* These should be rejected because the component types are invalid. We
don't care about the actual error messages here. */
-__vector __bool unsigned char vbuc; /* { dg-error "" "" } */
-__vector __bool signed char vbsc; /* { dg-error "" "" } */
-__vector __bool unsigned short vbuh; /* { dg-error "" "" } */
-__vector __bool signed short vbsh; /* { dg-error "" "" } */
-__vector __bool unsigned int vbui; /* { dg-error "" "" } */
-__vector __bool signed int vbsi; /* { dg-error "" "" } */
-__vector __bool unsigned vbuj; /* { dg-error "" "" } */
-__vector __bool signed vbsj; /* { dg-error "" "" } */
-__vector signed float vsf; /* { dg-error "" "" } */
-__vector unsigned float vuf; /* { dg-error "" "" } */
-__vector short float vsf; /* { dg-error "" "" } */
-__vector signed double vsd; /* { dg-error "" "" } */
-__vector unsigned double vud; /* { dg-error "" "" } */
-__vector short double vsd; /* { dg-error "" "" } */
-__vector __bool float vbf; /* { dg-error "" "" } */
-__vector __bool double vbd; /* { dg-error "" "" } */
-__vector __bool short float blf; /* { dg-error "" "" } */
-__vector __bool short double vlbd; /* { dg-error "" "" } */
+__vector __bool unsigned char vbuc; /* { dg-error "" } */
+__vector __bool signed char vbsc; /* { dg-error "" } */
+__vector __bool unsigned short vbuh; /* { dg-error "" } */
+__vector __bool signed short vbsh; /* { dg-error "" } */
+__vector __bool unsigned int vbui; /* { dg-error "" } */
+__vector __bool signed int vbsi; /* { dg-error "" } */
+__vector __bool unsigned vbuj; /* { dg-error "" } */
+__vector __bool signed vbsj; /* { dg-error "" } */
+__vector signed float vsf; /* { dg-error "" } */
+__vector unsigned float vuf; /* { dg-error "" } */
+__vector short float vsf; /* { dg-error "" } */
+__vector signed double vsd; /* { dg-error "" } */
+__vector unsigned double vud; /* { dg-error "" } */
+__vector short double vsd; /* { dg-error "" } */
+__vector __bool float vbf; /* { dg-error "" } */
+__vector __bool double vbd; /* { dg-error "" } */
+__vector __bool short float blf; /* { dg-error "" } */
+__vector __bool short double vlbd; /* { dg-error "" } */
/* { dg-message "note: previous" "prev vsf" { target *-*-* } 79 } */
/* { dg-message "note: previous" "prev vsd" { target *-*-* } 82 } */
/* These should get warnings for 32-bit code. */
-__vector long vl; /* { dg-warning "deprecated" "" } */
-__vector unsigned long vul; /* { dg-warning "deprecated" "" } */
-__vector signed long vsl; /* { dg-warning "deprecated" "" } */
-__vector __bool long int vbli; /* { dg-warning "deprecated" "" } */
-__vector long int vli; /* { dg-warning "deprecated" "" } */
-__vector unsigned long int vuli; /* { dg-warning "deprecated" "" } */
-__vector signed long int vsli; /* { dg-warning "deprecated" "" } */
+__vector long vl; /* { dg-warning "deprecated" } */
+__vector unsigned long vul; /* { dg-warning "deprecated" } */
+__vector signed long vsl; /* { dg-warning "deprecated" } */
+__vector __bool long int vbli; /* { dg-warning "deprecated" } */
+__vector long int vli; /* { dg-warning "deprecated" } */
+__vector unsigned long int vuli; /* { dg-warning "deprecated" } */
+__vector signed long int vsli; /* { dg-warning "deprecated" } */
/* These should be rejected for 64-bit code. */
-__vector long vl; /* { dg-error "invalid for 64" "" } */
-__vector unsigned long vul; /* { dg-error "invalid for 64" "" } */
-__vector signed long vsl; /* { dg-error "invalid for 64" "" } */
-__vector __bool long int vbli; /* { dg-error "invalid for 64" "" } */
-__vector long int vli; /* { dg-error "invalid for 64" "" } */
-__vector unsigned long int vuli; /* { dg-error "invalid for 64" "" } */
-__vector signed long int vsli; /* { dg-error "invalid for 64" "" } */
+__vector long vl; /* { dg-error "invalid for 64" } */
+__vector unsigned long vul; /* { dg-error "invalid for 64" } */
+__vector signed long vsl; /* { dg-error "invalid for 64" } */
+__vector __bool long int vbli; /* { dg-error "invalid for 64" } */
+__vector long int vli; /* { dg-error "invalid for 64" } */
+__vector unsigned long int vuli; /* { dg-error "invalid for 64" } */
+__vector signed long int vsli; /* { dg-error "invalid for 64" } */
/* Test to make sure that __float128 and long double cannot be combined together. */
__float128 add (__float128 a, long double b)
{
- return a+b; /* { dg-error "__float128 and long double cannot be used in the same expression" "" } */
+ return a+b; /* { dg-error "__float128 and long double cannot be used in the same expression" } */
}
__ibm128 sub (long double a, __float128 b)
{
- return a-b; /* { dg-error "__float128 and long double cannot be used in the same expression" "" } */
+ return a-b; /* { dg-error "__float128 and long double cannot be used in the same expression" } */
}
extern void ext_call (int (func) (void));
int
-outer_func (int init) /* { dg-error "-mno-pointers-to-nested-functions option" "" } */
+outer_func (int init) /* { dg-error "-mno-pointers-to-nested-functions option" } */
{
int value = init;
/* { dg-do compile } */
/* { dg-options "-Wmain -mstdmain" } */
-int main (void *wrong)/* { dg-warning "first argument of 'main' should be 'int'" "" } */
+int main (void *wrong)/* { dg-warning "first argument of 'main' should be 'int'" } */
{
/* { dg-warning "'main' takes only zero or two arguments" "" { target *-*-* } 4 } */
}
struct foo ea_struct4 = {
40,
- (__ea char *)lm_str, /* { dg-error "(initializer element is not constant)|(near initialization)" "" } */
+ (__ea char *)lm_str, /* { dg-error "(initializer element is not constant)|(near initialization)" } */
41,
};
t = 1
p => s
! We didn't dereference the pointer in the following line.
-p = f() ! { dg-warning "POINTER-valued function" "" }
+p = f() ! { dg-warning "POINTER-valued function" }
p = p+1
if (p.ne.2) call abort()
if (p.ne.s) call abort()
! { dg-do compile }
! Check that equivalences match common block layout.
program common_3
- common /block/ a, b, c, d ! { dg-error "not match ordering" "" }
+ common /block/ a, b, c, d ! { dg-error "not match ordering" }
integer a, b, c, d, n
dimension n(4)
equivalence (a, n(1))
v%p => i
i = 42
- write (unit=s, fmt='(I2)') v ! { dg-error "POINTER components" "" }
+ write (unit=s, fmt='(I2)') v ! { dg-error "POINTER components" }
if (s .ne. '42') call abort ()
end program
! For gfortran, see PR 13490
!
integer c
- c = -2147483648_4 / (-1) ! { dg-error "too big for its kind" "" }
+ c = -2147483648_4 / (-1) ! { dg-error "too big for its kind" }
end
PARAMETER (P=10)
INTEGER C(10),D(10),E(10),F(10)
C TERMINAL NOT INTEGER
- DATA (C(I),I=1,P) /10*10/ ! { dg-error "End expression in DO loop" "" }
+ DATA (C(I),I=1,P) /10*10/ ! { dg-error "End expression in DO loop" }
C START NOT INTEGER
- DATA (D(I),I=Q,10) /10*10/ ! { dg-error "Start expression in DO loop" "" }
+ DATA (D(I),I=Q,10) /10*10/ ! { dg-error "Start expression in DO loop" }
C INCREMENT NOT INTEGER
- DATA (E(I),I=1,10,Q) /10*10/ ! { dg-error "Step expression in DO loop" "" }
+ DATA (E(I),I=1,10,Q) /10*10/ ! { dg-error "Step expression in DO loop" }
END
SUBROUTINE QUICK
SAVE
C
- ASSIGN 101 TO JUMP ! { dg-warning "Deleted feature: ASSIGN" "" }
+ ASSIGN 101 TO JUMP ! { dg-warning "Deleted feature: ASSIGN" }
101 Continue
C
RETURN
LOGICAL REAL
REAL LOGICAL
INTEGER INTEGER, STOP, RETURN, GO TO
- ASSIGN 9 TO STOP ! { dg-warning "ASSIGN" "" }
+ ASSIGN 9 TO STOP ! { dg-warning "ASSIGN" }
ASSIGN = 9 + LOGICAL
- ASSIGN 7 TO RETURN ! { dg-warning "ASSIGN" "" }
- ASSIGN 9 TO GO TO ! { dg-warning "ASSIGN" "" }
+ ASSIGN 7 TO RETURN ! { dg-warning "ASSIGN" }
+ ASSIGN 9 TO GO TO ! { dg-warning "ASSIGN" }
GO TO = 5
STOP = 8
- IF (.NOT.REAL) GOTO STOP ! { dg-warning "Assigned GOTO" "" }
+ IF (.NOT.REAL) GOTO STOP ! { dg-warning "Assigned GOTO" }
IF (LOGICAL.GT.INTEGER) THEN
IF = LOGICAL +5
- IF (LOGICAL.EQ.5) ASSIGN 5 TO IF ! { dg-warning "ASSIGN" "" }
+ IF (LOGICAL.EQ.5) ASSIGN 5 TO IF ! { dg-warning "ASSIGN" }
INTEGER=IF
ELSE
- IF (ASSIGN.GT.STOP) ASSIGN 9 TO GOTO ! { dg-warning "ASSIGN" "" }
+ IF (ASSIGN.GT.STOP) ASSIGN 9 TO GOTO ! { dg-warning "ASSIGN" }
ELSE = GO TO
END IF = ELSE + GO TO
- IF (.NOT.REAL.AND.GOTO.GT.ELSE) GOTO RETURN ! { dg-warning "Assigned GOTO" "" }
+ IF (.NOT.REAL.AND.GOTO.GT.ELSE) GOTO RETURN ! { dg-warning "Assigned GOTO" }
END IF
5 CONTINUE
7 LOGICAL=LOGICAL+STOP
CaLL foo(W)
END
SUBROUTINE foo(W)
- yy(I)=A(I)Q(X) ! { dg-error "Unclassifiable statement" "" }
+ yy(I)=A(I)Q(X) ! { dg-error "Unclassifiable statement" }
c { dg-error "end of file" "end of file" { target *-*-* } 0 }
CCC warning, handle case where there is no such note.
logical l(10)
integer i(10)
- goto (10,20),l ! { dg-error "Selection expression in computed GOTO" "" }
- goto (10,20),i ! { dg-error "Selection expression in computed GOTO" "" }
+ goto (10,20),l ! { dg-error "Selection expression in computed GOTO" }
+ goto (10,20),i ! { dg-error "Selection expression in computed GOTO" }
10 stop
20 end
if(n .gt. 0 .and. incx.gt.0) go to 10
dnrm2 = zero
go to 300
- 10 assign 30 to next ! { dg-warning "ASSIGN" "" }
+ 10 assign 30 to next ! { dg-warning "ASSIGN" }
sum = zero
i = 1
ix = 1
- 20 go to next,(30, 50, 70, 110) ! { dg-warning "Assigned GOTO" "" }
+ 20 go to next,(30, 50, 70, 110) ! { dg-warning "Assigned GOTO" }
30 if( dabs(dx(i)) .gt. cutlo) go to 85
- assign 50 to next ! { dg-warning "ASSIGN" "" }
+ assign 50 to next ! { dg-warning "ASSIGN" }
xmax = zero
50 if( dx(i) .eq. zero) go to 200
if( dabs(dx(i)) .gt. cutlo) go to 85
- assign 70 to next ! { dg-warning "ASSIGN" "" }
+ assign 70 to next ! { dg-warning "ASSIGN" }
go to 105
100 continue
ix = j
- assign 110 to next ! { dg-warning "ASSIGN" "" }
+ assign 110 to next ! { dg-warning "ASSIGN" }
sum = (sum / dx(i)) / dx(i)
105 xmax = dabs(dx(i))
go to 115
SUBROUTINE FOO (B)
10 CALL BAR (A)
- ASSIGN 20 TO M !{ dg-warning "Deleted feature: ASSIGN" "" }
+ ASSIGN 20 TO M !{ dg-warning "Deleted feature: ASSIGN" }
IF (100.LT.A) GOTO 10
GOTO 40
C
20 IF (B.LT.ABS(A)) GOTO 10
- ASSIGN 30 TO M !{ dg-warning "Deleted feature: ASSIGN" "" }
+ ASSIGN 30 TO M !{ dg-warning "Deleted feature: ASSIGN" }
GOTO 40
C
- 30 ASSIGN 10 TO M !{ dg-warning "Deleted feature: ASSIGN" "" }
- 40 GOTO M,(10,20,30) !{ dg-warning "Deleted feature: Assigned GOTO" "" }
+ 30 ASSIGN 10 TO M !{ dg-warning "Deleted feature: ASSIGN" }
+ 40 GOTO M,(10,20,30) !{ dg-warning "Deleted feature: Assigned GOTO" }
END
g2(1,1) = 'a'
if (ichar(g2(1,1)) /= 97) call abort
- i = ichar(c) ! { dg-error "must be of length one" "" }
- i = ichar(c(:)) ! { dg-error "must be of length one" "" }
- i = ichar(s2) ! { dg-error "must be of length one" "" }
- i = ichar(c(1:2)) ! { dg-error "must be of length one" "" }
- i = ichar(c(1:)) ! { dg-error "must be of length one" "" }
- i = ichar('abc') ! { dg-error "must be of length one" "" }
+ i = ichar(c) ! { dg-error "must be of length one" }
+ i = ichar(c(:)) ! { dg-error "must be of length one" }
+ i = ichar(s2) ! { dg-error "must be of length one" }
+ i = ichar(c(1:2)) ! { dg-error "must be of length one" }
+ i = ichar(c(1:)) ! { dg-error "must be of length one" }
+ i = ichar('abc') ! { dg-error "must be of length one" }
! ichar and iachar use the same checking routines. DO a couple of tests to
! make sure it's not totally broken.
if (ichar(c(3:3)) /= 97) call abort
- i = ichar(c) ! { dg-error "must be of length one" "" }
+ i = ichar(c) ! { dg-error "must be of length one" }
i = ichar(dt%addr(1:1))
- i = ichar(dt%addr) ! { dg-error "must be of length one" "" }
- i = ichar(dt%addr(1:2)) ! { dg-error "must be of length one" "" }
- i = ichar(dt%addr(1:)) ! { dg-error "must be of length one" "" }
+ i = ichar(dt%addr) ! { dg-error "must be of length one" }
+ i = ichar(dt%addr(1:2)) ! { dg-error "must be of length one" }
+ i = ichar(dt%addr(1:)) ! { dg-error "must be of length one" }
i = ichar(dt1%addr(1:1))
i = ichar(dt1%addr)
contains
- real function f(a) ! { dg-warning "in generic interface" "" }
+ real function f(a) ! { dg-warning "in generic interface" }
real a
f = a
end function
module namelist_1
public
integer,private :: x
- namelist /n/ x ! { dg-error "cannot be member of PUBLIC namelist" "" }
+ namelist /n/ x ! { dg-error "cannot be member of PUBLIC namelist" }
end module
subroutine namelist_2(x)
integer,intent(in) :: x
namelist /n/ x
- read(*,n) ! { dg-error "is INTENT" "" }
+ read(*,n) ! { dg-error "is INTENT" }
end subroutine namelist_2
program namelist_3
integer,pointer :: x
allocate (x)
- namelist /n/ x ! { dg-error "NAMELIST attribute with POINTER attribute" "" }
+ namelist /n/ x ! { dg-error "NAMELIST attribute with POINTER attribute" }
end program namelist_3
real x
namelist /mynml/ x
x = 1
- print mynml ! { dg-error "PRINT namelist.*extension" "" }
+ print mynml ! { dg-error "PRINT namelist.*extension" }
end
! { dg-do run }
- integer i, j /1/, g/2/, h ! { dg-warning "" "" }
- integer k, l(3) /2*2,1/ ! { dg-warning "" "" }
- real pi /3.1416/, e ! { dg-warning "" "" }
+ integer i, j /1/, g/2/, h ! { dg-warning "" }
+ integer k, l(3) /2*2,1/ ! { dg-warning "" }
+ real pi /3.1416/, e ! { dg-warning "" }
if (j /= 1) call abort ()
if (g /= 2) call abort ()
!
character(5) c
open (42,status='scratch')
- write (42,'(A,$)') 'abc' ! { dg-warning ".*descriptor" "" }
+ write (42,'(A,$)') 'abc' ! { dg-warning ".*descriptor" }
write (42,'(A)') 'de'
rewind (42)
read (42,'(A)') c
! { dg-do compile }
program a
real x
- x = tiny(x) / huge(x) ! { dg-warning "Arithmetic underflow" "" }
+ x = tiny(x) / huge(x) ! { dg-warning "Arithmetic underflow" }
end program a
-- { dg-do compile }
package Integer_Value is
X : constant Integer :=
- Integer'Integer_Value (12.8); -- { dg-error "fixed-point type" "" }
+ Integer'Integer_Value (12.8); -- { dg-error "fixed-point type" }
end Integer_Value;
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" "" } */
+ /* { dg-warning ".v3. is @protected" } */
}
@interface foo
struct f {}
-struct g { int a; }; /* { dg-error "expected ';', identifier or " "" } */
+struct g { int a; }; /* { dg-error "expected ';', identifier or " } */
- (struct f *) a;
- (struct g *) b;
int f(struct g *x)
{
- return x->a; /* { dg-bogus " has no member " "" } */
+ return x->a; /* { dg-bogus " has no member " } */
}