+2017-04-19 Tom de Vries <tom@codesourcery.com>
+
+ PR testsuite/80221
+ * c-c++-common/Wimplicit-fallthrough-6.c: Use relative line number for
+ subsequent dg directives.
+ * c-c++-common/Wimplicit-fallthrough-7.c: Same.
+ * c-c++-common/Wint-to-pointer-cast-3.c: Same.
+ * c-c++-common/attr-fallthrough-2.c: Same.
+ * c-c++-common/cilk-plus/AN/parser_errors2.c: Same.
+ * c-c++-common/cilk-plus/AN/parser_errors3.c: Same.
+ * c-c++-common/cilk-plus/AN/pr61191.c: Same.
+ * c-c++-common/cilk-plus/AN/pr61963.c: Same.
+ * c-c++-common/cilk-plus/AN/pr62008.c: Same.
+ * c-c++-common/cilk-plus/AN/rank_mismatch.c: Same.
+ * c-c++-common/cilk-plus/CK/cilk_for_errors.c: Same.
+ * c-c++-common/cilk-plus/CK/errors.c: Same.
+ * c-c++-common/cilk-plus/CK/no_args_error.c: Same.
+ * c-c++-common/cilk-plus/PS/clauses1.c: Same.
+ * c-c++-common/cilk-plus/SE/vlength_errors.c: Same.
+ * c-c++-common/cpp/pr57580.c: Same.
+ * c-c++-common/goacc/asyncwait-1.c: Same.
+ * c-c++-common/goacc/cache-2.c: Same.
+ * c-c++-common/goacc/declare-2.c: Same.
+ * c-c++-common/goacc/deviceptr-1.c: Same.
+ * c-c++-common/goacc/routine-5.c: Same.
+ * c-c++-common/gomp/clauses-2.c: Same.
+ * c-c++-common/gomp/ordered-3.c: Same.
+ * c-c++-common/gomp/pr67501.c: Same.
+ * c-c++-common/pr20000.c: Same.
+ * c-c++-common/pr43395.c: Same.
+ * c-c++-common/pr49706.c: Same.
+ * c-c++-common/pr77624-1.c: Same.
+ * c-c++-common/pr77624-2.c: Same.
+ * c-c++-common/raw-string-14.c: Same.
+ * c-c++-common/raw-string-16.c: Same.
+ * c-c++-common/raw-string-3.c: Same.
+ * c-c++-common/raw-string-4.c: Same.
+ * c-c++-common/raw-string-5.c: Same.
+ * c-c++-common/raw-string-6.c: Same.
+ * g++.dg/abi/mangle41.C: Same.
+ * g++.dg/conversion/nullptr1.C: Same.
+ * g++.dg/cpp0x/alias-decl-80296.C: Same.
+ * g++.dg/cpp0x/auto27.C: Same.
+ * g++.dg/cpp0x/constexpr-98.C: Same.
+ * g++.dg/cpp0x/constexpr-diag2.C: Same.
+ * g++.dg/cpp0x/diag2.C: Same.
+ * g++.dg/cpp0x/lambda/lambda-syntax1.C: Same.
+ * g++.dg/cpp0x/nullptr15.C: Same.
+ * g++.dg/cpp0x/pr31431-2.C: Same.
+ * g++.dg/cpp0x/pr31431.C: Same.
+ * g++.dg/cpp0x/pr79118.C: Same.
+ * g++.dg/cpp0x/static_assert3.C: Same.
+ * g++.dg/cpp0x/temp_default2.C: Same.
+ * g++.dg/cpp0x/trailing4.C: Same.
+ * g++.dg/cpp0x/variadic-ex10.C: Same.
+ * g++.dg/cpp0x/variadic-ex13.C: Same.
+ * g++.dg/cpp0x/variadic-ex14.C: Same.
+ * g++.dg/cpp0x/variadic-ex3.C: Same.
+ * g++.dg/cpp0x/variadic-ex4.C: Same.
+ * g++.dg/cpp0x/variadic59.C: Same.
+ * g++.dg/cpp0x/vt-37737-2.C: Same.
+ * g++.dg/cpp0x/vt-57397-1.C: Same.
+ * g++.dg/cpp0x/vt-57397-2.C: Same.
+ * g++.dg/cpp1z/constexpr-lambda8.C: Same.
+ * g++.dg/cpp1z/gen-attrs1.C: Same.
+ * g++.dg/diagnostic/pr71075.C: Same.
+ * g++.dg/eh/goto2.C: Same.
+ * g++.dg/eh/goto3.C: Same.
+ * g++.dg/expr/bitfield4.C: Same.
+ * g++.dg/expr/bitfield5.C: Same.
+ * g++.dg/expr/bitfield6.C: Same.
+ * g++.dg/expr/bool1.C: Same.
+ * g++.dg/expr/bool3.C: Same.
+ * g++.dg/expr/cond10.C: Same.
+ * g++.dg/expr/cond11.C: Same.
+ * g++.dg/expr/lval3.C: Same.
+ * g++.dg/expr/lval4.C: Same.
+ * g++.dg/ext/anon-struct4.C: Same.
+ * g++.dg/ext/attrib44.C: Same.
+ * g++.dg/ext/builtin3.C: Same.
+ * g++.dg/ext/dllimport7.C: Same.
+ * g++.dg/ext/label5.C: Same.
+ * g++.dg/ext/no-asm-1.C: Same.
+ * g++.dg/ext/utf16-4.C: Same.
+ * g++.dg/ext/vla2.C: Same.
+ * g++.dg/gomp/block-1.C: Same.
+ * g++.dg/gomp/block-2.C: Same.
+ * g++.dg/gomp/block-3.C: Same.
+ * g++.dg/gomp/block-5.C: Same.
+ * g++.dg/gomp/linear-2.C: Same.
+ * g++.dg/gomp/target-1.C: Same.
+ * g++.dg/gomp/target-2.C: Same.
+ * g++.dg/gomp/taskgroup-1.C: Same.
+ * g++.dg/gomp/teams-1.C: Same.
+ * g++.dg/inherit/pure1.C: Same.
+ * g++.dg/init/array43.C: Same.
+ * g++.dg/init/array46.C: Same.
+ * g++.dg/init/const10.C: Same.
+ * g++.dg/init/ctor4-1.C: Same.
+ * g++.dg/init/ctor4.C: Same.
+ * g++.dg/init/new37.C: Same.
+ * g++.dg/init/pr25811.C: Same.
+ * g++.dg/init/pr29043.C: Same.
+ * g++.dg/init/pr29571.C: Same.
+ * g++.dg/lookup/duperr1.C: Same.
+ * g++.dg/lookup/error1.C: Same.
+ * g++.dg/lookup/koenig5.C: Same.
+ * g++.dg/lookup/pr77549.C: Same.
+ * g++.dg/lookup/suggestions1.C: Same.
+ * g++.dg/lookup/using16.C: Same.
+ * g++.dg/lookup/using7.C: Same.
+ * g++.dg/other/anon-union3.C: Same.
+ * g++.dg/other/array2.C: Same.
+ * g++.dg/other/error13.C: Same.
+ * g++.dg/other/error34.C: Same.
+ * g++.dg/overload/builtin1.C: Same.
+ * g++.dg/overload/conv-op1.C: Same.
+ * g++.dg/overload/error3.C: Same.
+ * g++.dg/overload/koenig1.C: Same.
+ * g++.dg/overload/operator5.C: Same.
+ * g++.dg/overload/template5.C: Same.
+ * g++.dg/overload/unknown1.C: Same.
+ * g++.dg/overload/using2.C: Same.
+ * g++.dg/parse/constructor1.C: Same.
+ * g++.dg/parse/crash36.C: Same.
+ * g++.dg/parse/crash63.C: Same.
+ * g++.dg/parse/error11.C: Same.
+ * g++.dg/parse/error12.C: Same.
+ * g++.dg/parse/error14.C: Same.
+ * g++.dg/parse/error2.C: Same.
+ * g++.dg/parse/error21.C: Same.
+ * g++.dg/parse/error26.C: Same.
+ * g++.dg/parse/error36.C: Same.
+ * g++.dg/parse/friend12.C: Same.
+ * g++.dg/parse/invalid-op1.C: Same.
+ * g++.dg/parse/missing-template1.C: Same.
+ * g++.dg/parse/parser-pr28152-2.C: Same.
+ * g++.dg/parse/parser-pr28152.C: Same.
+ * g++.dg/parse/pr16696-permissive.C: Same.
+ * g++.dg/parse/pr16696.C: Same.
+ * g++.dg/parse/pr69628.C: Same.
+ * g++.dg/parse/ret-type2.C: Same.
+ * g++.dg/parse/specialization1.C: Same.
+ * g++.dg/parse/template3.C: Same.
+ * g++.dg/parse/template9.C: Same.
+ * g++.dg/parse/typename11.C: Same.
+ * g++.dg/plugin/attribute_plugin-test-1.C: Same.
+ * g++.dg/pr45330.C: Same.
+ * g++.dg/rtti/typeid6.C: Same.
+ * g++.dg/spellcheck-fields.C: Same.
+ * g++.dg/spellcheck-typenames.C: Same.
+ * g++.dg/tc1/dr108.C: Same.
+ * g++.dg/tc1/dr147.C: Same.
+ * g++.dg/template/arg7.C: Same.
+ * g++.dg/template/conv11.C: Same.
+ * g++.dg/template/crash13.C: Same.
+ * g++.dg/template/crash55.C: Same.
+ * g++.dg/template/dependent-expr5.C: Same.
+ * g++.dg/template/error17.C: Same.
+ * g++.dg/template/error33.C: Same.
+ * g++.dg/template/error4.C: Same.
+ * g++.dg/template/error50.C: Same.
+ * g++.dg/template/error53.C: Same.
+ * g++.dg/template/friend.C: Same.
+ * g++.dg/template/func2.C: Same.
+ * g++.dg/template/local6.C: Same.
+ * g++.dg/template/member5.C: Same.
+ * g++.dg/template/meminit1.C: Same.
+ * g++.dg/template/nested3.C: Same.
+ * g++.dg/template/nontype6.C: Same.
+ * g++.dg/template/overload12.C: Same.
+ * g++.dg/template/ptrmem8.C: Same.
+ * g++.dg/template/qualified-id1.C: Same.
+ * g++.dg/template/spec15.C: Same.
+ * g++.dg/template/static1.C: Same.
+ * g++.dg/template/static10.C: Same.
+ * g++.dg/template/static2.C: Same.
+ * g++.dg/template/ttp25.C: Same.
+ * g++.dg/template/typedef2.C: Same.
+ * g++.dg/template/typename2.C: Same.
+ * g++.dg/template/unify10.C: Same.
+ * g++.dg/template/unify6.C: Same.
+ * g++.dg/template/unify7.C: Same.
+ * g++.dg/template/unify9.C: Same.
+ * g++.dg/template/varmod1.C: Same.
+ * g++.dg/ubsan/div-by-zero-1.C: Same.
+ * g++.dg/ubsan/pr63956.C: Same.
+ * g++.dg/warn/Waddress-1.C: Same.
+ * g++.dg/warn/Wconversion2.C: Same.
+ * g++.dg/warn/Wnull-conversion-1.C: Same.
+ * g++.dg/warn/Wsubobject-linkage-1.C: Same.
+ * g++.dg/warn/Wsubobject-linkage-3.C: Same.
+ * g++.dg/warn/Wswitch-1.C: Same.
+ * g++.dg/warn/Wtype-limits-Wextra.C: Same.
+ * g++.dg/warn/Wtype-limits.C: Same.
+ * g++.dg/warn/Wunused-parm-5.C: Same.
+ * g++.dg/warn/deprecated-6.C: Same.
+ * g++.dg/warn/deprecated.C: Same.
+ * g++.dg/warn/incomplete1.C: Same.
+ * g++.dg/warn/multiple-overflow-warn-1.C: Same.
+ * g++.dg/warn/multiple-overflow-warn-2.C: Same.
+ * g++.dg/warn/multiple-overflow-warn-3.C: Same.
+ * g++.dg/warn/overflow-warn-1.C: Same.
+ * g++.dg/warn/overflow-warn-3.C: Same.
+ * g++.dg/warn/overflow-warn-4.C: Same.
+ * g++.dg/warn/pr12242.C: Same.
+ * g++.dg/warn/pr30551-2.C: Same.
+ * g++.dg/warn/pr30551.C: Same.
+ * g++.old-deja/g++.benjamin/16077.C: Same.
+ * g++.old-deja/g++.bob/inherit1.C: Same.
+ * g++.old-deja/g++.brendan/crash56.C: Same.
+ * g++.old-deja/g++.brendan/template17.C: Same.
+ * g++.old-deja/g++.eh/ctor1.C: Same.
+ * g++.old-deja/g++.jason/bool5.C: Same.
+ * g++.old-deja/g++.jason/cond.C: Same.
+ * g++.old-deja/g++.jason/operator.C: Same.
+ * g++.old-deja/g++.jason/pmf5.C: Same.
+ * g++.old-deja/g++.law/ctors5.C: Same.
+ * g++.old-deja/g++.law/missed-error2.C: Same.
+ * g++.old-deja/g++.law/operators9.C: Same.
+ * g++.old-deja/g++.law/temps1.C: Same.
+ * g++.old-deja/g++.mike/for2.C: Same.
+ * g++.old-deja/g++.mike/ns5.C: Same.
+ * g++.old-deja/g++.mike/ns7.C: Same.
+ * g++.old-deja/g++.mike/p10769b.C: Same.
+ * g++.old-deja/g++.niklas/t120.C: Same.
+ * g++.old-deja/g++.niklas/t121.C: Same.
+ * g++.old-deja/g++.ns/koenig5.C: Same.
+ * g++.old-deja/g++.oliva/overload1.C: Same.
+ * g++.old-deja/g++.other/crash24.C: Same.
+ * g++.old-deja/g++.other/crash25.C: Same.
+ * g++.old-deja/g++.other/decl5.C: Same.
+ * g++.old-deja/g++.other/lineno5.C: Same.
+ * g++.old-deja/g++.other/null3.C: Same.
+ * g++.old-deja/g++.other/overcnv2.C: Same.
+ * g++.old-deja/g++.other/ptrmem7.C: Same.
+ * g++.old-deja/g++.other/typename1.C: Same.
+ * g++.old-deja/g++.other/vaarg3.C: Same.
+ * g++.old-deja/g++.pt/crash10.C: Same.
+ * g++.old-deja/g++.pt/crash28.C: Same.
+ * g++.old-deja/g++.pt/crash38.C: Same.
+ * g++.old-deja/g++.pt/explicit70.C: Same.
+ * g++.old-deja/g++.pt/explicit77.C: Same.
+ * g++.old-deja/g++.pt/expr2.C: Same.
+ * g++.old-deja/g++.pt/spec5.C: Same.
+ * g++.old-deja/g++.pt/spec6.C: Same.
+ * g++.old-deja/g++.pt/typename3.C: Same.
+ * g++.old-deja/g++.pt/typename5.C: Same.
+ * g++.old-deja/g++.pt/typename6.C: Same.
+ * g++.old-deja/g++.pt/typename7.C: Same.
+ * g++.old-deja/g++.pt/unify4.C: Same.
+ * g++.old-deja/g++.pt/unify8.C: Same.
+ * g++.old-deja/g++.pt/vaarg3.C: Same.
+ * g++.old-deja/g++.robertl/eb22.C: Same.
+ * g++.old-deja/g++.robertl/eb4.C: Same.
+ * g++.old-deja/g++.robertl/eb44.C: Same.
+ * g++.old-deja/g++.robertl/eb69.C: Same.
+ * g++.old-deja/g++.robertl/eb98.C: Same.
+ * gcc.dg/20031223-1.c: Same.
+ * gcc.dg/940510-1.c: Same.
+ * gcc.dg/990506-0.c: Same.
+ * gcc.dg/Walloca-1.c: Same.
+ * gcc.dg/Walloca-2.c: Same.
+ * gcc.dg/Wconversion-integer.c: Same.
+ * gcc.dg/Wcxx-compat-8.c: Same.
+ * gcc.dg/Wimplicit-int-1.c: Same.
+ * gcc.dg/Wimplicit-int-2.c: Same.
+ * gcc.dg/Wimplicit-int-4.c: Same.
+ * gcc.dg/Wpointer-sign-Wall.c: Same.
+ * gcc.dg/Wpointer-sign-pedantic.c: Same.
+ * gcc.dg/Wshadow-1.c: Same.
+ * gcc.dg/Wshadow-3.c: Same.
+ * gcc.dg/Wswitch-enum-error.c: Same.
+ * gcc.dg/Wswitch-enum.c: Same.
+ * gcc.dg/Wswitch-error.c: Same.
+ * gcc.dg/Wswitch.c: Same.
+ * gcc.dg/Wtype-limits-Wextra.c: Same.
+ * gcc.dg/Wtype-limits.c: Same.
+ * gcc.dg/Wvla-larger-than-2.c: Same.
+ * gcc.dg/anon-struct-5.c: Same.
+ * gcc.dg/array-10.c: Same.
+ * gcc.dg/array-11.c: Same.
+ * gcc.dg/array-15.c: Same.
+ * gcc.dg/array-2.c: Same.
+ * gcc.dg/array-8.c: Same.
+ * gcc.dg/array-const-2.c: Same.
+ * gcc.dg/array-const-3.c: Same.
+ * gcc.dg/bitfld-1.c: Same.
+ * gcc.dg/bitfld-8.c: Same.
+ * gcc.dg/builtin-redefine.c: Same.
+ * gcc.dg/c11-noreturn-1.c: Same.
+ * gcc.dg/c11-noreturn-2.c: Same.
+ * gcc.dg/c11-static-assert-3.c: Same.
+ * gcc.dg/c90-arraydecl-1.c: Same.
+ * gcc.dg/c90-complex-1.c: Same.
+ * gcc.dg/c90-complit-1.c: Same.
+ * gcc.dg/c90-const-expr-11.c: Same.
+ * gcc.dg/c90-const-expr-7.c: Same.
+ * gcc.dg/c90-const-expr-8.c: Same.
+ * gcc.dg/c90-enum-comma-1.c: Same.
+ * gcc.dg/c90-flex-array-1.c: Same.
+ * gcc.dg/c90-hexfloat-1.c: Same.
+ * gcc.dg/c90-idem-qual-1.c: Same.
+ * gcc.dg/c90-idem-qual-2.c: Same.
+ * gcc.dg/c90-idem-qual-3.c: Same.
+ * gcc.dg/c90-mixdecl-1.c: Same.
+ * gcc.dg/c90-restrict-1.c: Same.
+ * gcc.dg/c90-return-1.c: Same.
+ * gcc.dg/c99-array-nonobj-1.c: Same.
+ * gcc.dg/c99-arraydecl-1.c: Same.
+ * gcc.dg/c99-complex-1.c: Same.
+ * gcc.dg/c99-complex-2.c: Same.
+ * gcc.dg/c99-complit-2.c: Same.
+ * gcc.dg/c99-const-expr-7.c: Same.
+ * gcc.dg/c99-const-expr-8.c: Same.
+ * gcc.dg/c99-flex-array-3.c: Same.
+ * gcc.dg/c99-flex-array-7.c: Same.
+ * gcc.dg/c99-flex-array-typedef-7.c: Same.
+ * gcc.dg/c99-impl-decl-1.c: Same.
+ * gcc.dg/c99-impl-int-1.c: Same.
+ * gcc.dg/c99-impl-int-2.c: Same.
+ * gcc.dg/c99-init-3.c: Same.
+ * gcc.dg/c99-restrict-1.c: Same.
+ * gcc.dg/c99-return-1.c: Same.
+ * gcc.dg/c99-tag-1.c: Same.
+ * gcc.dg/c99-tag-3.c: Same.
+ * gcc.dg/call-diag-2.c: Same.
+ * gcc.dg/cpp/19940712-1.c: Same.
+ * gcc.dg/cpp/19951025-1.c: Same.
+ * gcc.dg/cpp/19990413-1.c: Same.
+ * gcc.dg/cpp/direct2.c: Same.
+ * gcc.dg/cpp/direct2s.c: Same.
+ * gcc.dg/cpp/pr28709.c: Same.
+ * gcc.dg/cpp/pr61854-c90.c: Same.
+ * gcc.dg/cpp/pr61854-c94.c: Same.
+ * gcc.dg/cpp/pragma-1.c: Same.
+ * gcc.dg/cpp/pragma-2.c: Same.
+ * gcc.dg/cpp/trad/escaped-eof.c: Same.
+ * gcc.dg/cpp/trad/literals-2.c: Same.
+ * gcc.dg/cpp/warn-comments-2.c: Same.
+ * gcc.dg/cpp/warn-comments-3.c: Same.
+ * gcc.dg/cpp/warn-comments.c: Same.
+ * gcc.dg/cpp/warn-long-long-2.c: Same.
+ * gcc.dg/cpp/warn-long-long.c: Same.
+ * gcc.dg/cpp/warn-redefined-2.c: Same.
+ * gcc.dg/cpp/warn-redefined.c: Same.
+ * gcc.dg/darwin-cfstring-2.c: Same.
+ * gcc.dg/darwin-cfstring-format-1.c: Same.
+ * gcc.dg/decl-9.c: Same.
+ * gcc.dg/declspec-1.c: Same.
+ * gcc.dg/declspec-10.c: Same.
+ * gcc.dg/declspec-11.c: Same.
+ * gcc.dg/declspec-13.c: Same.
+ * gcc.dg/declspec-18.c: Same.
+ * gcc.dg/declspec-4.c: Same.
+ * gcc.dg/declspec-5.c: Same.
+ * gcc.dg/declspec-6.c: Same.
+ * gcc.dg/declspec-8.c: Same.
+ * gcc.dg/deprecated-4.c: Same.
+ * gcc.dg/deprecated.c: Same.
+ * gcc.dg/dfp/composite-type.c: Same.
+ * gcc.dg/empty-source-2.c: Same.
+ * gcc.dg/empty-source-3.c: Same.
+ * gcc.dg/format/attr-6.c: Same.
+ * gcc.dg/format/branch-1.c: Same.
+ * gcc.dg/format/c90-printf-1.c: Same.
+ * gcc.dg/format/c90-strftime-2.c: Same.
+ * gcc.dg/format/c99-strftime-1.c: Same.
+ * gcc.dg/format/cmn-err-1.c: Same.
+ * gcc.dg/format/few-1.c: Same.
+ * gcc.dg/format/ms_branch-1.c: Same.
+ * gcc.dg/format/ms_unnamed-1.c: Same.
+ * gcc.dg/format/ms_va-1.c: Same.
+ * gcc.dg/format/unnamed-1.c: Same.
+ * gcc.dg/format/va-1.c: Same.
+ * gcc.dg/format/xopen-1.c: Same.
+ * gcc.dg/funcdef-var-1.c: Same.
+ * gcc.dg/funcdef-var-2.c: Same.
+ * gcc.dg/gnu89-const-expr-1.c: Same.
+ * gcc.dg/gnu89-const-expr-2.c: Same.
+ * gcc.dg/gnu90-const-expr-1.c: Same.
+ * gcc.dg/gnu99-const-expr-1.c: Same.
+ * gcc.dg/gnu99-const-expr-2.c: Same.
+ * gcc.dg/gnu99-init-2.c: Same.
+ * gcc.dg/gomp/_Atomic-5.c: Same.
+ * gcc.dg/gomp/appendix-a/a.24.1.c: Same.
+ * gcc.dg/gomp/atomic-5.c: Same.
+ * gcc.dg/gomp/linear-1.c: Same.
+ * gcc.dg/gomp/pr67500.c: Same.
+ * gcc.dg/init-bad-1.c: Same.
+ * gcc.dg/init-bad-2.c: Same.
+ * gcc.dg/init-bad-3.c: Same.
+ * gcc.dg/init-string-1.c: Same.
+ * gcc.dg/label-compound-stmt-1.c: Same.
+ * gcc.dg/label-decl-2.c: Same.
+ * gcc.dg/label-decl-4.c: Same.
+ * gcc.dg/large-size-array-2.c: Same.
+ * gcc.dg/large-size-array-4.c: Same.
+ * gcc.dg/lvalue-6.c: Same.
+ * gcc.dg/m-un-2.c: Same.
+ * gcc.dg/multiple-overflow-warn-1.c: Same.
+ * gcc.dg/multiple-overflow-warn-2.c: Same.
+ * gcc.dg/multiple-overflow-warn-3.c: Same.
+ * gcc.dg/nested-redef-1.c: Same.
+ * gcc.dg/no-asm-1.c: Same.
+ * gcc.dg/no-asm-3.c: Same.
+ * gcc.dg/no-asm-4.c: Same.
+ * gcc.dg/noncompile/20010524-1.c: Same.
+ * gcc.dg/noncompile/incomplete-5.c: Same.
+ * gcc.dg/noncompile/pr44517.c: Same.
+ * gcc.dg/noncompile/pr52290.c: Same.
+ * gcc.dg/noreturn-1.c: Same.
+ * gcc.dg/overflow-warn-1.c: Same.
+ * gcc.dg/overflow-warn-2.c: Same.
+ * gcc.dg/overflow-warn-3.c: Same.
+ * gcc.dg/overflow-warn-4.c: Same.
+ * gcc.dg/parm-mismatch-1.c: Same.
+ * gcc.dg/parser-pr28152-2.c: Same.
+ * gcc.dg/parser-pr28152.c: Same.
+ * gcc.dg/pedwarn-init.c: Same.
+ * gcc.dg/pointer-arith-2.c: Same.
+ * gcc.dg/pointer-arith-3.c: Same.
+ * gcc.dg/pointer-arith-4.c: Same.
+ * gcc.dg/pr14475.c: Same.
+ * gcc.dg/pr18596-3.c: Same.
+ * gcc.dg/pr18809-1.c: Same.
+ * gcc.dg/pr27953.c: Same.
+ * gcc.dg/pr30457.c: Same.
+ * gcc.dg/pr30551-2.c: Same.
+ * gcc.dg/pr30551-3.c: Same.
+ * gcc.dg/pr30551-4.c: Same.
+ * gcc.dg/pr30551-5.c: Same.
+ * gcc.dg/pr30551-6.c: Same.
+ * gcc.dg/pr30551.c: Same.
+ * gcc.dg/pr36997.c: Same.
+ * gcc.dg/pr41842.c: Same.
+ * gcc.dg/pr48552-1.c: Same.
+ * gcc.dg/pr48552-2.c: Same.
+ * gcc.dg/pr59717.c: Same.
+ * gcc.dg/pr61077.c: Same.
+ * gcc.dg/pr61096-1.c: Same.
+ * gcc.dg/pr63626.c: Same.
+ * gcc.dg/pr64223-1.c: Same.
+ * gcc.dg/pr64223-2.c: Same.
+ * gcc.dg/pr8788-1.c: Same.
+ * gcc.dg/pr8927-1.c: Same.
+ * gcc.dg/pragma-darwin.c: Same.
+ * gcc.dg/pragma-diag-5.c: Same.
+ * gcc.dg/pragma-message.c: Same.
+ * gcc.dg/redecl-1.c: Same.
+ * gcc.dg/simd-1.c: Same.
+ * gcc.dg/simd-5.c: Same.
+ * gcc.dg/simd-6.c: Same.
+ * gcc.dg/spellcheck-fields.c: Same.
+ * gcc.dg/spellcheck-typenames.c: Same.
+ * gcc.dg/struct-semi-2.c: Same.
+ * gcc.dg/struct-semi-3.c: Same.
+ * gcc.dg/transparent-union-3.c: Same.
+ * gcc.dg/ucnid-8.c: Same.
+ * gcc.dg/uninit-pr19430-O0.c: Same.
+ * gcc.dg/uninit-pr19430.c: Same.
+ * gcc.dg/uninit-pr20644-O0.c: Same.
+ * gcc.dg/utf-dflt.c: Same.
+ * gcc.dg/utf-dflt2.c: Same.
+ * gcc.dg/utf16-4.c: Same.
+ * gcc.dg/vla-11.c: Same.
+ * gcc.dg/vla-20.c: Same.
+ * gcc.dg/vla-init-1.c: Same.
+ * gcc.dg/vla-init-2.c: Same.
+ * gcc.dg/vla-init-3.c: Same.
+ * gcc.dg/weak/weak-6.c: Same.
+ * gcc.dg/weak/weak-7.c: Same.
+ * gcc.dg/wtr-int-type-1.c: Same.
+ * gcc.target/aarch64/mgeneral-regs_1.c: Same.
+ * gcc.target/arm/polytypes.c: Same.
+ * gcc.target/i386/spellcheck-options-4.c: Same.
+ * gcc.target/powerpc/20030218-1.c: Same.
+ * gcc.target/sh/pr21255-4.c: Same.
+ * gcc.test-framework/dg-error-exp-XP.c: Same.
+ * gfortran.dg/array_constructor_30.f03: Same.
+ * gfortran.dg/class_30.f90: Same.
+ * gfortran.dg/goacc/subarrays.f95: Same.
+ * gfortran.dg/gomp/appendix-a/a.23.5.f90: Same.
+ * gfortran.dg/gomp/appendix-a/a.24.1.f90: Same.
+ * gfortran.dg/intrinsic_std_1.f90: Same.
+ * gfortran.dg/pr70006.f90: Same.
+ * gfortran.dg/warning-directive-1.F90: Same.
+ * gfortran.dg/warning-directive-2.F90: Same.
+ * gfortran.dg/warning-directive-3.F90: Same.
+ * gfortran.dg/warning-directive-4.F90: Same.
+ * obj-c++.dg/attributes/method-noreturn-1.mm: Same.
+ * obj-c++.dg/class-extension-1.mm: Same.
+ * obj-c++.dg/class-extension-2.mm: Same.
+ * obj-c++.dg/class-protocol-1.mm: Same.
+ * obj-c++.dg/cxx-ivars-1.mm: Same.
+ * obj-c++.dg/duplicate-class-1.mm: Same.
+ * obj-c++.dg/exceptions-3.mm: Same.
+ * obj-c++.dg/exceptions-4.mm: Same.
+ * obj-c++.dg/exceptions-5.mm: Same.
+ * obj-c++.dg/fsf-nsstring-format-1.mm: Same.
+ * obj-c++.dg/fsf-package-0.m: Same.
+ * obj-c++.dg/invalid-type-1.mm: Same.
+ * obj-c++.dg/method-12.mm: Same.
+ * obj-c++.dg/method-13.mm: Same.
+ * obj-c++.dg/method-15.mm: Same.
+ * obj-c++.dg/method-16.mm: Same.
+ * obj-c++.dg/method-6.mm: Same.
+ * obj-c++.dg/method-7.mm: Same.
+ * obj-c++.dg/property/at-property-1.mm: Same.
+ * obj-c++.dg/property/at-property-14.mm: Same.
+ * obj-c++.dg/property/at-property-17.mm: Same.
+ * obj-c++.dg/property/at-property-21.mm: Same.
+ * obj-c++.dg/property/at-property-5.mm: Same.
+ * obj-c++.dg/property/dotsyntax-4.mm: Same.
+ * obj-c++.dg/property/dynamic-3.mm: Same.
+ * obj-c++.dg/property/dynamic-4.mm: Same.
+ * obj-c++.dg/property/property-neg-1.mm: Same.
+ * obj-c++.dg/property/property-neg-6.mm: Same.
+ * obj-c++.dg/property/synthesize-11.mm: Same.
+ * obj-c++.dg/property/synthesize-5.mm: Same.
+ * obj-c++.dg/property/synthesize-6.mm: Same.
+ * obj-c++.dg/proto-lossage-4.mm: Same.
+ * obj-c++.dg/protocol-qualifier-2.mm: Same.
+ * obj-c++.dg/strings/strings-1.mm: Same.
+ * obj-c++.dg/super-class-1.mm: Same.
+ * obj-c++.dg/syntax-error-6.mm: Same.
+ * obj-c++.dg/syntax-error-7.mm: Same.
+ * obj-c++.dg/syntax-error-9.mm: Same.
+ * obj-c++.dg/try-catch-13.mm: Same.
+ * objc.dg/attributes/method-noreturn-1.m: Same.
+ * objc.dg/bad-receiver-type-2.m: Same.
+ * objc.dg/bad-receiver-type.m: Same.
+ * objc.dg/call-super-2.m: Same.
+ * objc.dg/class-2.m: Same.
+ * objc.dg/class-extension-1.m: Same.
+ * objc.dg/class-extension-2.m: Same.
+ * objc.dg/class-protocol-1.m: Same.
+ * objc.dg/desig-init-1.m: Same.
+ * objc.dg/duplicate-class-1.m: Same.
+ * objc.dg/exceptions-3.m: Same.
+ * objc.dg/exceptions-4.m: Same.
+ * objc.dg/exceptions-5.m: Same.
+ * objc.dg/foreach-6.m: Same.
+ * objc.dg/foreach-7.m: Same.
+ * objc.dg/fsf-nsstring-format-1.m: Same.
+ * objc.dg/fsf-package-0.m: Same.
+ * objc.dg/invalid-type-1.m: Same.
+ * objc.dg/method-11.m: Same.
+ * objc.dg/method-19.m: Same.
+ * objc.dg/method-2.m: Same.
+ * objc.dg/method-20.m: Same.
+ * objc.dg/method-5.m: Same.
+ * objc.dg/method-6.m: Same.
+ * objc.dg/method-7.m: Same.
+ * objc.dg/method-9.m: Same.
+ * objc.dg/missing-proto-3.m: Same.
+ * objc.dg/private-1.m: Same.
+ * objc.dg/property/at-property-1.m: Same.
+ * objc.dg/property/at-property-14.m: Same.
+ * objc.dg/property/at-property-17.m: Same.
+ * objc.dg/property/at-property-21.m: Same.
+ * objc.dg/property/at-property-5.m: Same.
+ * objc.dg/property/dynamic-3.m: Same.
+ * objc.dg/property/dynamic-4.m: Same.
+ * objc.dg/property/property-neg-1.m: Same.
+ * objc.dg/property/property-neg-6.m: Same.
+ * objc.dg/property/synthesize-11.m: Same.
+ * objc.dg/property/synthesize-5.m: Same.
+ * objc.dg/property/synthesize-6.m: Same.
+ * objc.dg/proto-hier-1.m: Same.
+ * objc.dg/proto-lossage-4.m: Same.
+ * objc.dg/protocol-qualifier-2.m: Same.
+ * objc.dg/strings/strings-1.m: Same.
+ * objc.dg/type-size-1.m: Same.
+
2017-04-18 Jeff Law <law@redhat.com>
PR target/74563
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } 120 } */
+ { /* { dg-warning "statement may fall through" "" { target c } . } */
int j = 0;
bar (j);
if (j == 8)
- return; /* { dg-warning "statement may fall through" "" { target c++ } 124 } */
+ return; /* { dg-warning "statement may fall through" "" { target c++ } . } */
}
case 2:
bar (99);
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } 148 } */
+ { /* { dg-warning "statement may fall through" "" { target c } . } */
int j = 0;
bar (j);
if (j == 8)
bar (1);
else
- return; /* { dg-warning "statement may fall through" "" { target c++ } 154 } */
+ return; /* { dg-warning "statement may fall through" "" { target c++ } . } */
}
case 2:
bar (99);
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } 178 } */
+ { /* { dg-warning "statement may fall through" "" { target c } . } */
int j = 0;
bar (j);
if (j == 8)
bar (1);
else
- bar (2); /* { dg-warning "statement may fall through" "" { target c++ } 184 } */
+ bar (2); /* { dg-warning "statement may fall through" "" { target c++ } . } */
}
case 2:
bar (99);
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } 282 } */
+ { /* { dg-warning "statement may fall through" "" { target c } . } */
int j = 9;
- switch (j); /* { dg-warning "statement may fall through" "" { target c++ } 284 } */
+ switch (j); /* { dg-warning "statement may fall through" "" { target c++ } . } */
}
case 2:
bar (99);
switch (i)
{
case 1:
- { /* { dg-warning "statement may fall through" "" { target c } 24 } */
- int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */
+ { /* { dg-warning "statement may fall through" "" { target c } . } */
+ int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } . } */
}
case 2:
bar (99);
switch (i)
{
case 1:
- for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } 34 } */
- map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } 35 } */
+ for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } . } */
+ map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } . } */
case 2:
bar (99);
}
g (void)
{
return (char) p;
-/* { dg-warning "cast from pointer to integer of different size" "" { target c } 19 } */
-/* { dg-error "cast from 'void\\*' to 'char' loses precision" "" { target c++ } 19 } */
+/* { dg-warning "cast from pointer to integer of different size" "" { target c } .-1 } */
+/* { dg-error "cast from 'void\\*' to 'char' loses precision" "" { target c++ } .-2 } */
}
case 1:
bar (1);
__attribute__((used));
- /* { dg-warning "empty declaration" "" { target c } 13 } */
- /* { dg-warning "ignored" "" { target c++ } 13 } */
+ /* { dg-warning "empty declaration" "" { target c } .-1 } */
+ /* { dg-warning "ignored" "" { target c++ } .-2 } */
case 2:
bar (1);
__attribute__((foo));
- /* { dg-warning "empty declaration" "" { target c } 18 } */
- /* { dg-warning "ignored" "" { target c++ } 18 } */
+ /* { dg-warning "empty declaration" "" { target c } .-1 } */
+ /* { dg-warning "ignored" "" { target c++ } .-2 } */
case 3:
bar (1);
__attribute__((fallthrough)) /* { dg-warning "not followed" "" { target c } } */
case 4: /* { dg-error "expected" } */
bar (1);
__attribute__((fallthrough)) 1;
- /* { dg-error "expected" "" { target c } 26 } */
- /* { dg-warning "not followed" "" { target *-*-* } 26 } */
+ /* { dg-error "expected" "" { target c } .-1 } */
+ /* { dg-warning "not followed" "" { target *-*-* } .-2 } */
case 5:
bar (1);
__attribute__((fallthrough)) int i; /* { dg-warning "ignored|not followed" } */
__attribute__((fallthrough));
case 9:
__attribute__((fallthrough));
- /* { dg-warning "not preceding" "" { target *-*-* } 42 } */
+ /* { dg-warning "not preceding" "" { target *-*-* } .-1 } */
bar (1);
case 10:
bar (1);
int array[10][10], array2[10];
array2[:] = array2[1:2:] ; /* { dg-error "expected expression before" "" { target c } } */
- /* { dg-error "expected primary-expression before" "" { target c++ } 8 } */
+ /* { dg-error "expected primary-expression before" "" { target c++ } .-1 } */
return 0; /* { dg-error "expected ';' before" "" { target c } } */
}
int array[10][10], array2[10];
array2[:] = array2[1: :] ; /* { dg-error "expected expression before" "" { target c } } */
- /* { dg-error "expected primary-expression before" "" { target c++ } 8 } */
+ /* { dg-error "expected primary-expression before" "" { target c++ } .-1 } */
return 0; /* { dg-error "expected ';' before" "" { target c } } */
}
double f(double * A, double * B)
{
return __sec_reduce_add((B[0:500])(; /* { dg-error "called object" "" { target c } } */
-/* { dg-error "expected expression before ';' token" "" { target c } 7 } */
-/* { dg-error "expected primary-expression before ';' token" "" { target c++ } 7 } */
+/* { dg-error "expected expression before ';' token" "" { target c } .-1 } */
+/* { dg-error "expected primary-expression before ';' token" "" { target c++ } .-2 } */
} /* { dg-error "expected" "" { target c } } */
void f (int * int *a) /* { dg-error "expected" } */
{
- a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } 7 } */
+ a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } . } */
a[0:64] = 0;
}
{
int tmp[w][h];
tmp[:][:] = a[0:w][0:h]; /* { dg-error "base of array section must be pointer or array type" } */
- /* { dg-error "start-index and length fields necessary" "" { target c } 8 } */
+ /* { dg-error "start-index and length fields necessary" "" { target c } .-1 } */
}
int array[10][10], array2[10];
array[:][:] = array[:]; /* { dg-error "rank mismatch between" } */
- /* { dg-error "invalid conversion" "" { target c++ } 12 } */
+ /* { dg-error "invalid conversion" "" { target c++ } .-1 } */
x = array2[:]; /* { dg-error "cannot be scalar when" } */
int q = 0, ii = 0, jj = 0;
_Cilk_for (int ii; ii < 10; ii++) /* { dg-error "is not initialized" "" { target c } } */
- /* { dg-error "expected" "" { target c++ } 10 } */
+ /* { dg-error "expected" "" { target c++ } .-1 } */
q = 5;
_Cilk_for (; ii < 10; ii++) /* { dg-error "expected iteration declaration" } */
q = 2;
_Cilk_for (int ii = 0; ii < 10, jj < 10; ii++) /* { dg-error "expected ';' before ',' token" "" { target c } } */
- /* { dg-error "invalid controlling predicate" "" { target c++ } 20 } */
+ /* { dg-error "invalid controlling predicate" "" { target c++ } .-1 } */
q = 5;
_Cilk_for (int ii = 0; ii < 10; ) /* { dg-error "missing increment" } */
q = 5;
_Cilk_for (int ii; ii < 10; ii++) /* { dg-error "is not initialized" "" { target c } } */
- /* { dg-error "expected" "" { target c++ } 48 } */
+ /* { dg-error "expected" "" { target c++ } .-1 } */
q = 5;
return 0;
/* XXX: no error in C++ */
;
if (v + _Cilk_spawn func_2()) /* { dg-error "cannot contain" "" { target c } } */
- /* { dg-error "invalid use" "" { target c++ } 11 } */
+ /* { dg-error "invalid use" "" { target c++ } .-1 } */
;
if (v, _Cilk_spawn func_2()) /* { dg-error "spawned function call cannot be part" } */
;
typedef int(*func) (int);
void check () {
- func var = spawn_1; /* { dg-error "invalid conversion from" "" { target c++ } 8 } */
+ func var = spawn_1; /* { dg-error "invalid conversion from" "" { target c++ } . } */
_Cilk_spawn var (); /* { dg-error "too few arguments to function" } */
}
a[i] = b[j];
#pragma simd linear(blah2, 36)
- /* { dg-error "'blah2' \(undeclared\|has not been\)" "undeclared" { target *-*-* } 71 } */
- /* { dg-error "expected" "expected" { target *-*-* } 71 } */
+ /* { dg-error "'blah2' \(undeclared\|has not been\)" "undeclared" { target *-*-* } .-1 } */
+ /* { dg-error "expected" "expected" { target *-*-* } .-2 } */
for (int i=0; i < 1000; ++i)
a[i] = b[j];
int z = Q;
__attribute__ ((vector (uniform(x), vectorlength (), linear (y:1) ))) /* { dg-error "expected expression" "" { target c } } */
- /* { dg-error "expected primary-expression" "" { target c++ } 8 } */
+ /* { dg-error "expected primary-expression" "" { target c++ } .-1 } */
int func2 (int x, int y)
{
int zq = 5;
}
__attribute__ ((vector (uniform(x), linear (y:1), vectorlength (z) ))) /* { dg-error "vectorlength must be an integer" "" { target c } } */
- /* { dg-error "constant" "" { target c++ } 23 } */
+ /* { dg-error "constant" "" { target c++ } .-1 } */
int func4 (int x, int y)
{
int zq = 5;
}
__attribute__ ((vector (uniform(x), vectorlength (z), linear (y:1)))) /* { dg-error "vectorlength must be an integer" "" { target c } } */
- /* { dg-error "constant" "" { target c++ } 38 } */
+ /* { dg-error "constant" "" { target c++ } .-1 } */
int func6 (int x, int y)
{
int zq = 5;
_Pragma("message(\"message0\")") \
_Pragma("message(\"message1\")")
MSG /* { dg-message "message0" } */
-/* { dg-message "message1" "" { target *-*-* } 8 } */
+/* { dg-message "message1" "" { target *-*-* } .-1 } */
}
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) async (a)
- /* { dg-error "expected integer expression before" "" { target c } 54 } */
- /* { dg-error "'async' expression must be integral" "" { target c++ } 54 } */
+ /* { dg-error "expected integer expression before" "" { target c } .-1 } */
+ /* { dg-error "'async' expression must be integral" "" { target c++ } .-2 } */
{
for (ii = 0; ii < N; ii++)
b[ii] = a[ii];
}
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) async (1.0)
- /* { dg-error "expected integer expression before" "" { target c } 62 } */
- /* { dg-error "'async' expression must be integral" "" { target c++ } 62 } */
+ /* { dg-error "expected integer expression before" "" { target c } .-1 } */
+ /* { dg-error "'async' expression must be integral" "" { target c++ } .-2 } */
{
for (ii = 0; ii < N; ii++)
b[ii] = a[ii];
}
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait (1 /* { dg-error "expected '\\\)' before end of line" } */
- /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } 118 } */
+ /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
{
for (ii = 0; ii < N; ii++)
b[ii] = a[ii];
#pragma acc wait (1,2,,) /* { dg-error "expected (primary-|)expression before" } */
#pragma acc wait (1 /* { dg-error "expected '\\\)' before end of line" } */
- /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } 173 } */
+ /* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
#pragma acc wait (1,*) /* { dg-error "expected (primary-|)expression before" } */
#pragma acc wait async (*) /* { dg-error "expected (primary-|)expression before " } */
#pragma acc wait async (a)
- /* { dg-error "expected integer expression before" "" { target c } 206 } */
- /* { dg-error "expression must be integral" "" { target c++ } 206 } */
+ /* { dg-error "expected integer expression before" "" { target c } .-1 } */
+ /* { dg-error "expression must be integral" "" { target c++ } .-2 } */
#pragma acc wait async (1.0)
- /* { dg-error "expected integer expression before" "" { target c } 210 } */
- /* { dg-error "expression must be integral" "" { target c++ } 210 } */
+ /* { dg-error "expected integer expression before" "" { target c } .-1 } */
+ /* { dg-error "expression must be integral" "" { target c++ } .-2 } */
}
#pragma acc cache /* { dg-error "expected '\\\(' before end of line" } */
#pragma acc cache a[0:N] /* { dg-error "expected '\\\(' before 'a'" } */
- /* { dg-bogus "expected end of line before 'a'" "" { xfail c++ } 27 } */
+ /* { dg-bogus "expected end of line before 'a'" "" { xfail c++ } .-1 } */
#pragma acc cache (a) /* { dg-error "expected '\\\['" } */
#pragma acc cache ( /* { dg-error "expected (identifier|unqualified-id) before end of line" } */
#pragma acc cache () /* { dg-error "expected (identifier|unqualified-id) before '\\\)' token" } */
#pragma acc cache () /* { dg-error "expected (identifier|unqualified-id) before '\\\)' token" } */
#pragma acc cache (a[0:N] b[0:N]) /* { dg-error "expected '\\\)' before 'b'" } */
#pragma acc cache (a[0:N] b[0:N}) /* { dg-error "expected '\\\)' before 'b'" } */
- /* { dg-bogus "expected end of line before '\\\}' token" "" { xfail c++ } 38 } */
+ /* { dg-bogus "expected end of line before '\\\}' token" "" { xfail c++ } .-1 } */
#pragma acc cache (a[0:N] /* { dg-error "expected '\\\)' before end of line" } */
#pragma acc cache (a[0:N]) ( /* { dg-error "expected end of line before '\\(' token" } */
#pragma acc cache (a[0:N]) ii /* { dg-error "expected end of line before 'ii'" } */
#pragma acc declare /* { dg-error "no valid clauses" } */
#pragma acc declare create(undeclared) /* { dg-error "undeclared" } */
-/* { dg-error "no valid clauses" "second error" { target *-*-* } 6 } */
+/* { dg-error "no valid clauses" "second error" { target *-*-* } .-1 } */
int v0[10];
#pragma acc declare create(v0[1:3]) /* { dg-error "array section" } */
#pragma acc data deviceptr(fun1) /* { dg-error "'fun1' is not a variable" } */
;
#pragma acc parallel deviceptr(fun1[2:5])
- /* { dg-error "'fun1' is not a variable" "not a variable" { target *-*-* } 13 } */
- /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } 13 } */
+ /* { dg-error "'fun1' is not a variable" "not a variable" { target *-*-* } .-1 } */
+ /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } .-2 } */
;
int i;
#pragma acc kernels deviceptr(i) /* { dg-error "'i' is not a pointer variable" } */
;
#pragma acc data deviceptr(i[0:4])
- /* { dg-error "'i' is not a pointer variable" "not a pointer variable" { target *-*-* } 21 } */
- /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } 21 } */
+ /* { dg-error "'i' is not a pointer variable" "not a pointer variable" { target *-*-* } .-1 } */
+ /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } .-2 } */
;
float fa[10];
#pragma acc parallel deviceptr(fa) /* { dg-error "'fa' is not a pointer variable" } */
;
#pragma acc kernels deviceptr(fa[1:5])
- /* { dg-error "'fa' is not a pointer variable" "not a pointer variable" { target *-*-* } 29 } */
- /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } 29 } */
+ /* { dg-error "'fa' is not a pointer variable" "not a pointer variable" { target *-*-* } .-1 } */
+ /* { dg-error "expected '\\\)' before '\\\[' token" "array" { target *-*-* } .-2 } */
;
float *fp;
int i;
float *fp;
#pragma acc kernels deviceptr(fp,u,fun2,i,fp)
- /* { dg-error "'u' undeclared" "u undeclared" { target *-*-* } 46 } */
- /* { dg-error "'fun2' is not a variable" "fun2 not a variable" { target *-*-* } 46 } */
- /* { dg-error "'i' is not a pointer variable" "i not a pointer variable" { target *-*-* } 46 } */
- /* { dg-error "'fp' appears more than once in data clauses" "fp more than once" { target *-*-* } 46 } */
+ /* { dg-error "'u' undeclared" "u undeclared" { target *-*-* } .-1 } */
+ /* { dg-error "'fun2' is not a variable" "fun2 not a variable" { target *-*-* } .-2 } */
+ /* { dg-error "'i' is not a pointer variable" "i not a pointer variable" { target *-*-* } .-3 } */
+ /* { dg-error "'fp' appears more than once in data clauses" "fp more than once" { target *-*-* } .-4 } */
;
}
void PC1( /* { dg-bogus "variable or field .PC1. declared void" "TODO" { xfail c++ } } */
#pragma acc routine
- /* { dg-error ".#pragma acc routine. must be at file scope" "" { target c } 11 }
- { dg-error ".#pragma. is not allowed here" "" { target c++ } 11 } */
+ /* { dg-error ".#pragma acc routine. must be at file scope" "" { target c } .-1 }
+ { dg-error ".#pragma. is not allowed here" "" { target c++ } .-2 } */
) /* { dg-bogus "expected declaration specifiers or .\\.\\.\\.. before .\\). token" "TODO" { xfail c } } */
{
}
#pragma omp target map (t.r) map (t) map (t.s[0]) firstprivate (t) /* { dg-error "appears both in data and map clauses" } */
bar (t.s);
#pragma omp target map (t) map (t.r) firstprivate (t) map (t.s[0]) /* { dg-error "appears both in data and map clauses" } */
- bar (t.s); /* { dg-error "appears more than once in map clauses" "" { target *-*-* } 51 } */
+ bar (t.s); /* { dg-error "appears more than once in map clauses" "" { target *-*-* } .-1 } */
}
for (i = 0; i < 64; i++)
{
#pragma omp ordered threads, simd, threads, simd /* { dg-error "too many .threads. clauses" } */
- ; /* { dg-error "too many .simd. clauses" "" { target *-*-* } 47 } */
+ ; /* { dg-error "too many .simd. clauses" "" { target *-*-* } .-1 } */
}
#pragma omp for simd ordered(1) /* { dg-error ".ordered. clause with parameter may not be specified on .#pragma omp for simd. construct" } */
for (i = 0; i < 64; i++)
{
int i, j;
#pragma omp for simd copyprivate(j /* { dg-error "before end of line" } */
- for (i = 0; i < 16; ++i) /* { dg-error "is not valid for" "" { target *-*-* } 9 } */
+ for (i = 0; i < 16; ++i) /* { dg-error "is not valid for" "" { target *-*-* } .-1 } */
;
}
int g(void) {
return 1; /* { dg-warning "function declared 'noreturn' has a 'return' statement" "has return" } */
-} /* { dg-warning "'noreturn' function does return" "does return" { target *-*-* } 12 } */
+} /* { dg-warning "'noreturn' function does return" "does return" { target *-*-* } .-1 } */
int g2(void) {
h();
int vg2(void); /* { dg-bogus ".noreturn. function returns non-void value" } */
int vg(void) {
- return 1; /* { dg-warning "function declared 'noreturn' has a 'return' statement" "has return" { target c } 27 } */
-} /* { dg-warning "'noreturn' function does return" "does return" { target c } 27 } */
+ return 1; /* { dg-warning "function declared 'noreturn' has a 'return' statement" "has return" { target c } . } */
+} /* { dg-warning "'noreturn' function does return" "does return" { target c } .-1 } */
int vg2(void) {
h();
{
lab:
return &&lab;
-/* { dg-warning "function returns address of label" "" { target c } 8 } */
+/* { dg-warning "function returns address of label" "" { target c } .-1 } */
/* { dg-warning "address of label" "" { target c++ } 7 } */
}
__label__ lab;
lab:
return &&lab;
-/* { dg-warning "function returns address of label" "" { target c } 18 } */
+/* { dg-warning "function returns address of label" "" { target c } .-1 } */
/* { dg-warning "address of label" "" { target c++ } 17 } */
}
{
int i;
return &i;
-/* { dg-warning "function returns address of local variable" "" { target c } 27 } */
+/* { dg-warning "function returns address of local variable" "" { target c } .-1 } */
/* { dg-warning "address of local variable" "" { target c++ } 26 } */
}
extern int foo_i (void);
#ifdef __cplusplus
-template <class T, class U> bool tfn1(T t, U u) { return (!t == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } 15 } */
+template <class T, class U> bool tfn1(T t, U u) { return (!t == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
template <class T, class U> bool tfn2(T t, U u) { return ((!t) == u); }
-template <class T, class U> bool tfn3(T t, U u) { return (!g(t) == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } 17 } */
+template <class T, class U> bool tfn3(T t, U u) { return (!g(t) == u); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
template <class T, class U> bool tfn4(T t, U u) { return ((!g(t)) == u); }
template <class T, class U> bool tfn5(T t, U u) { return (!!t == u); } /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
template <class T, class U> bool tfn6(T t, U u) { return (!!g(t) == u); } /* { dg-bogus "logical not is only applied to the left hand side of comparison" } */
-template <int N> bool tfn7(int i1, int i2) { return (!i1 == i2); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } 21 } */
+template <int N> bool tfn7(int i1, int i2) { return (!i1 == i2); } /* { dg-warning "logical not is only applied to the left hand side of comparison" "" { target c++ } . } */
#endif
void
foo (int a)
{
return __atomic_is_lock_free (2, a); /* { dg-warning "pointer from integer" "" { target c } } */
-} /* { dg-error "invalid conversion" "" { target c++ } 7 } */
+} /* { dg-error "invalid conversion" "" { target c++ } .-1 } */
int
bar (int a)
{
return __atomic_always_lock_free (2, a); /* { dg-warning "pointer from integer" "" { target c } } */
-} /* { dg-error "invalid conversion" "" { target c++ } 13 } */
+} /* { dg-error "invalid conversion" "" { target c++ } .-1 } */
__atomic_is_lock_free (2, a, 2); /* { dg-error "too many arguments" } */
__atomic_is_lock_free (2); /* { dg-error "too few arguments" } */
__atomic_is_lock_free (2, b); /* { dg-error "incompatible type" "" { target c } } */
- /* { dg-message "expected" "" { target c } 10 } */
- /* { dg-error "convert" "" { target c++ } 10 } */
+ /* { dg-message "expected" "" { target c } .-1 } */
+ /* { dg-error "convert" "" { target c++ } .-2 } */
__atomic_is_lock_free (2, 0);
}
__atomic_always_lock_free (2, a, 2); /* { dg-error "too many arguments" } */
__atomic_always_lock_free (2); /* { dg-error "too few arguments" } */
__atomic_always_lock_free (2, b); /* { dg-error "incompatible type" "" { target c } } */
- /* { dg-message "expected" "" { target c } 22 } */
- /* { dg-error "convert" "" { target c++ } 22 } */
+ /* { dg-message "expected" "" { target c } .-1 } */
+ /* { dg-error "convert" "" { target c++ } .-2 } */
__atomic_always_lock_free (2, 0);
}
// { dg-warning "missing terminating" "missing" { target *-*-* } 10 }
// { dg-error "19:missing terminating" "missing" { target *-*-* } 10 }
const void *s2 = R"abcdefghijklmn??/(a)abcdefghijklmn???";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 16 }
- // { dg-error "stray" "stray" { target *-*-* } 16 }
- // { dg-error "expected" "expected" { target *-*-* } 16 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
+ // { dg-error "expected" "expected" { target *-*-* } .-3 }
const void *s3 = R"abcdefghijklmno??/(a)abcdefghijklmno???";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 20 }
- // { dg-error "stray" "stray" { target *-*-* } 20 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s4 = R"abcdefghijklmnop??=(a)abcdefghijklmnop??=";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 23 }
- // { dg-error "stray" "stray" { target *-*-* } 23 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s5 = R"abc\
()abcdef";
// { dg-error "invalid character" "invalid" { target *-*-* } 26 }
// { dg-error "invalid character" "invalid" { target *-*-* } 6 }
// { dg-error "stray" "stray" { target *-*-* } 6 }
const void *s1 = R"abcdefghijklmn??/(a)abcdefghijklmn???";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 10 }
- // { dg-error "stray" "stray" { target *-*-* } 10 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s2 = R"abcdefghijklmno??/(a)abcdefghijklmno???";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 14 }
- // { dg-error "stray" "stray" { target *-*-* } 14 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s3 = R"abcdefghijklmnop??=(a)abcdefghijklmnop??=?"; // { dg-warning "trigraph ..= ignored" }
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 17 }
- // { dg-error "stray" "stray" { target *-*-* } 17 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s4 = R"abc\
()abcdef";
// { dg-error "invalid character" "invalid" { target *-*-* } 20 }
// { dg-options "-std=c++98" { target c++ } }
const void *s0 = R"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 7 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const void *s1 = uR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 9 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const void *s2 = UR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 11 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const void *s3 = u8R"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 13 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const void *s4 = LR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 15 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i0 = R'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
- // { dg-error "expected ',' or ';'" "expected" { target c } 18 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i1 = uR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
- // { dg-error "expected ',' or ';'" "expected" { target c } 20 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i2 = UR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
- // { dg-error "expected ',' or ';'" "expected" { target c } 22 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i3 = u8R'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
- // { dg-error "expected ',' or ';'" "expected" { target c } 24 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i4 = LR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
- // { dg-error "expected ',' or ';'" "expected" { target c } 26 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
#define R "a"
#define uR "b"
// { dg-options "-std=c++0x" { target c++ } }
const int i0 = R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 6 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i1 = uR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 8 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i2 = UR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 10 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i3 = u8R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 12 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
const int i4 = LR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target c } 14 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } .-1 }
#define R 1 +
#define uR 2 +
// { dg-options "-std=c++0x" { target c++ } }
const void *s0 = R"0123456789abcdefg()0123456789abcdefg";
- // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 5 }
- // { dg-error "stray" "stray" { target *-*-* } 5 }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s1 = R" () ";
- // { dg-error "invalid character" "invalid" { target *-*-* } 8 }
- // { dg-error "stray" "stray" { target *-*-* } 8 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s2 = R" () ";
- // { dg-error "invalid character" "invalid" { target *-*-* } 11 }
- // { dg-error "stray" "stray" { target *-*-* } 11 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s3 = R")())";
- // { dg-error "invalid character" "invalid" { target *-*-* } 14 }
- // { dg-error "stray" "stray" { target *-*-* } 14 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s4 = R"@()@";
- // { dg-error "invalid character" "invalid" { target *-*-* } 17 }
- // { dg-error "stray" "stray" { target *-*-* } 17 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s5 = R"$()$";
- // { dg-error "invalid character" "invalid" { target *-*-* } 20 }
- // { dg-error "stray" "stray" { target *-*-* } 20 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
const void *s6 = R"\u0040()\u0040";
- // { dg-error "invalid character" "invalid" { target *-*-* } 23 }
- // { dg-error "stray" "stray" { target *-*-* } 23 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } .-1 }
+ // { dg-error "stray" "stray" { target *-*-* } .-2 }
int main () {}
// { dg-options "-std=c++0x" { target c++ } }
const void *s0 = R"ouch()ouCh"; // { dg-error "at end of input" "end" }
- // { dg-error "unterminated raw string" "unterminated" { target *-*-* } 5 }
+ // { dg-error "unterminated raw string" "unterminated" { target *-*-* } .-1 }
#include <x86intrin.h>
void f(__m128) { } // { dg-message "previous declaration" }
void f(__m256) { } // { dg-error "conflicts" }
-// { dg-message "mangling" "" { target *-*-* } 7 }
+// { dg-message "mangling" "" { target *-*-* } .-1 }
void *p = 0;
void *q = 0 * (INT_MAX + 1); // { dg-error "invalid conversion" }
-// { dg-warning "integer overflow in expression" "" { target *-*-* } 8 }
+// { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 }
template <int... N> using B = A<+N...>;
B<int> b; // { dg-error "type/value mismatch" }
- // { dg-message "expected a constant" "expected" { target *-*-* } 8 }
+ // { dg-message "expected a constant" "expected" { target *-*-* } .-1 }
// PR c++/51186
auto main()->int // { dg-error "std=" "std" { target { ! c++11 } } }
- // { dg-error "auto" "auto" { target { ! c++11 } } 3 }
- // { dg-error "no type" "no type" { target { ! c++11 } } 3 }
+ // { dg-error "auto" "auto" { target { ! c++11 } } .-1 }
+ // { dg-error "no type" "no type" { target { ! c++11 } } .-2 }
{ }
// { dg-options "-std=c++98" }
constexpr int i = 42; // { dg-message "std=c\\+\\+11" }
-// { dg-error "constexpr" "" { target *-*-* } 3 }
+// { dg-error "constexpr" "" { target *-*-* } .-1 }
// { dg-do compile { target c++11 } }
constexpr int X (X); // { dg-error "not usable" }
-// { dg-message "own initializer" "" { target *-*-* } 4 }
+// { dg-message "own initializer" "" { target *-*-* } .-1 }
{
const A a;
f(a); // { dg-error "no match" }
- // { dg-error "qualifiers" "" { target *-*-* } 15 }
- // { dg-error "lvalue" "" { target *-*-* } 15 }
+ // { dg-error "qualifiers" "" { target *-*-* } .-1 }
+ // { dg-error "lvalue" "" { target *-*-* } .-2 }
g(a); // { dg-error "qualifiers" }
}
// { dg-do compile { target c++11 } }
void foo() { [] () -> void (); } // { dg-error "returning a function" "returning" }
-// { dg-error "expected .\{" "expected" { target *-*-* } 4 }
+// { dg-error "expected .\{" "expected" { target *-*-* } .-1 }
// Deduction to nullptr_t, no deduction to pointer type
//
g(nullptr); // { dg-error "no matching function for call to " }
- // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 19 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } .-1 }
type_equal<float*>(g((float*)nullptr));
decltype(nullptr) mynull = 0;
g(mynull); // { dg-error "no matching function for call to " }
- // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 23 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } .-1 }
type_equal<float*>(g((float*)mynull));
}
void bar()
{
foo<int>(); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
void bar()
{
foo<int>(); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
constexpr Two (int) : a() {} // { dg-error "b' must be initialized" }
constexpr Two (unsigned) : b () {} // { dg-error "a' must be initialized" }
constexpr Two (void *) {} // { dg-error "a' must be initialized" }
- // { dg-error "b' must be initialized" "" { target *-*-* } 35 }
+ // { dg-error "b' must be initialized" "" { target *-*-* } .-1 }
};
Two e ();
// { dg-do compile { target c++11 } }
static_assert(7 / 0, "X"); // { dg-error "non-constant condition" "non-constant" }
-// { dg-warning "division by zero" "zero" { target *-*-* } 2 }
-// { dg-error "division by zero is not a constant expression" "not a constant" { target *-*-* } 2 }
+// { dg-warning "division by zero" "zero" { target *-*-* } .-1 }
+// { dg-error "division by zero is not a constant expression" "not a constant" { target *-*-* } .-2 }
f(1, 'c'); // f<int,char>(1,'c')
f(1); // f<int,double>(1,0)
f(); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
f<int>(); // f<int,double>(0,0)
f<int,char>(); // f<int,char>(0,0)
}
template<class T> void g(T){} // { dg-message "note" }
int main() { g(f); } // { dg-error "no matching function" }
-// { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
+// { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
Tuple<int> t1; // Types contains one argument: int
Tuple<int, float> t2; // Types contains two arguments: int and float
Tuple<0> error; // { dg-error "mismatch" "mismatch" }
-// { dg-message "expected a type" "expected a type" { target *-*-* } 7 }
+// { dg-message "expected a type" "expected a type" { target *-*-* } .-1 }
f(const_cast<const Args*>(&args)...); // okay: ``Args'' and ``args'' are expanded
f(5 ...); // { dg-error "contains no argument packs" }
f(args); // { dg-error "5:parameter packs not expanded" }
- // { dg-message "args" "note" { target *-*-* } 36 }
+ // { dg-message "args" "note" { target *-*-* } .-1 }
f(h(args...) + args...); // okay: first ``args'' expanded within h, second ``args'' expanded within f.
}
X<A> xA; // okay
X<B> xB; // { dg-error "mismatch" "mismatch" }
-// { dg-message "expected a template" "expected" { target *-*-* } 11 }
+// { dg-message "expected a template" "expected" { target *-*-* } .-1 }
X<C> xC; // { dg-error "mismatch" "mismatch" }
-// { dg-message "expected a template" "expected" { target *-*-* } 13 }
+// { dg-message "expected a template" "expected" { target *-*-* } .-1 }
Y<A> yA;
Y<B> yB;
Y<C> yC; // okay
{
int i = f<int>(5.6);
int j = f(5.6); // { dg-error "no matching" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
f<void>(f<int, bool>);
f<void>(f<int>); // { dg-error "no matching" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
f<int>("aa",3.0); // Y is deduced to be char*, and
// Z is deduced to be double
f("aa",3.0); // { dg-error "no matching" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
f2<char, short, int, long>(); // okay
}
// { dg-do compile { target c++11 } }
template<class T, typename... VarArgs>
void print(T t, VarArgs args); // { dg-error "packs not expanded" }
-// { dg-message "VarArgs" "note" { target *-*-* } 3 }
+// { dg-message "VarArgs" "note" { target *-*-* } .-1 }
void f() // { dg-message "note" }
{
f<T...>(); // { dg-error "no matching" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 6 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
template<>
int main()
{
foo(); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 1 argument, 0 provided" "" { target *-*-* } 12 }
+ // { dg-message "candidate expects at least 1 argument, 0 provided" "" { target *-*-* } .-1 }
foo(1);
foo(1, 2);
bar(); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 2 arguments, 0 provided" "" { target *-*-* } 16 }
+ // { dg-message "candidate expects at least 2 arguments, 0 provided" "" { target *-*-* } .-1 }
bar(1); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 2 arguments, 1 provided" "" { target *-*-* } 18 }
+ // { dg-message "candidate expects at least 2 arguments, 1 provided" "" { target *-*-* } .-1 }
bar(1, 2);
bar(1, 2, 3);
}
int main()
{
foo(); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 1 argument, 0 provided" "" { target *-*-* } 12 }
+ // { dg-message "candidate expects at least 1 argument, 0 provided" "" { target *-*-* } .-1 }
foo(1);
foo(1, 2);
foo(1, 2, 3);
bar(); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 2 arguments, 0 provided" "" { target *-*-* } 17 }
+ // { dg-message "candidate expects at least 2 arguments, 0 provided" "" { target *-*-* } .-1 }
bar(1); // { dg-error "no matching" }
- // { dg-message "candidate expects at least 2 arguments, 1 provided" "" { target *-*-* } 19 }
+ // { dg-message "candidate expects at least 2 arguments, 1 provided" "" { target *-*-* } .-1 }
bar(1, 2);
bar(1, 2, 3);
bar(1, 2, 3, 4);
// No specialization of the function call operator template can be constexpr
// (because of the local static).
auto NC = [](auto a) { static int s; return a; }; // { dg-error "static" }
-// { dg-message "operator int" "" { target *-*-* } 11 }
+// { dg-message "operator int" "" { target *-*-* } .+1 }
static_assert( Fwd(NC ,3) == 3); // { dg-error "" }
// We look for the string "operator int" to check that we aren't trying to do
{
static int a [[using gnu: unused, used]]; // { dg-warning "attribute using prefix only available" "" { target c++14_down } }
int b [[ using foo : bar (2), baz ]]; // { dg-warning "'foo::bar' scoped attribute directive ignored" }
- // { dg-warning "'foo::baz' scoped attribute directive ignored" "" { target *-*-* } 8 }
- // { dg-warning "attribute using prefix only available" "" { target c++14_down } 8 }
+ // { dg-warning "'foo::baz' scoped attribute directive ignored" "" { target *-*-* } .-1 }
+ // { dg-warning "attribute using prefix only available" "" { target c++14_down } .-2 }
int c [[ using foo : using ("foo")]]; // { dg-warning "'foo::using' scoped attribute directive ignored" }
- // { dg-warning "attribute using prefix only available" "" { target c++14_down } 11 }
+ // { dg-warning "attribute using prefix only available" "" { target c++14_down } .-1 }
b = 0;
c = 0;
return b + c;
bar ()
{
int a [[ using BAR: foo::bar]]; // { dg-error "attribute using prefix used together with scoped attribute token" }
- // { dg-warning "ignored" "" { target *-*-* } 21 }
- // { dg-warning "attribute using prefix only available" "" { target c++14_down } 21 }
+ // { dg-warning "ignored" "" { target *-*-* } .-1 }
+ // { dg-warning "attribute using prefix only available" "" { target c++14_down } .-2 }
int b [[ using BAZ: bar(2), bar::bar(3, 4) ]];// { dg-error "attribute using prefix used together with scoped attribute token" }
- // { dg-warning "ignored" "" { target *-*-* } 24 }
- // { dg-warning "attribute using prefix only available" "" { target c++14_down } 24 }
+ // { dg-warning "ignored" "" { target *-*-* } .-1 }
+ // { dg-warning "attribute using prefix only available" "" { target c++14_down } .-2 }
a = 0;
b = 0;
return a + b;
baz ()
{
int a [[ using using: using]]; // { dg-warning "attribute using prefix only available" "" { target c++14_down } }
- // { dg-warning "'using::using' scoped attribute directive ignored" "" { target *-*-* } 35 }
+ // { dg-warning "'using::using' scoped attribute directive ignored" "" { target *-*-* } .-1 }
int b [[ using bitand: bitor, xor]]; // { dg-warning "attribute using prefix only available" "" { target c++14_down } }
- // { dg-warning "'bitand::bitor' scoped attribute directive ignored" "" { target *-*-* } 37 }
- // { dg-warning "'bitand::xor' scoped attribute directive ignored" "" { target *-*-* } 37 }
+ // { dg-warning "'bitand::bitor' scoped attribute directive ignored" "" { target *-*-* } .-1 }
+ // { dg-warning "'bitand::xor' scoped attribute directive ignored" "" { target *-*-* } .-2 }
a = 0;
b = 0;
return a + b;
template<typename T> void foo(A<T,1>) {}
int main() {
foo(A<int,2>()); // { dg-error "no matching" }
-// { dg-message "template argument .2. does not match .1." "" { target *-*-* } 6 }
+// { dg-message "template argument .2. does not match .1." "" { target *-*-* } .-1 }
}
} catch (...)
{
l2: ; // { dg-error "jump to label 'l2'" }
- // { dg-message "enters catch block" "" { target *-*-*} 10 }
+ // { dg-message "enters catch block" "" { target *-*-*} .-1 }
goto l1; // { dg-message "from here|enters try block" }
}
} catch (...)
{
l2: ; // { dg-error "jump to label 'l2'" }
- // { dg-message "enters catch block" "" { target *-*-*} 11 }
+ // { dg-message "enters catch block" "" { target *-*-*} .-1 }
goto l1; // { dg-message "from here|enters try block" }
}
int main() {
f(s.x++); // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 17 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
f(++s.x); // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 19 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
}
int main() {
s.x++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 11 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
if (s.x != 1)
return 1;
++s.x; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 15 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
if (s.x != 1)
return 2;
}
void f() {
++s.x = false; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 10 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
}
int i;
b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 13 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 15 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
i = b;
if (i != 1)
abort ();
int i;
b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 13 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 15 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
i = b;
if (i != 1)
abort ();
foo (bool b)
{
b ? c : s; // { dg-error "?:" }
- // { dg-message "convert" "" { target *-*-* } 15 }
+ // { dg-message "convert" "" { target *-*-* } .-1 }
}
foo (bool b)
{
b ? c : a; // { dg-error "?:" }
- // { dg-message "ambiguous" "" { target *-*-* } 18 }
+ // { dg-message "ambiguous" "" { target *-*-* } .-1 }
}
{
bool i = 0;
i++ = 3; // { dg-error "" }
- // { dg-warning "deprecated" "" { target { ! c++1z } } 6 }
+ // { dg-warning "deprecated" "" { target { ! c++1z } } .-1 }
}
{
bool i = 0;
++i = 3;
- // { dg-warning "deprecated" "" { target { ! c++1z } } 6 }
- // { dg-error "forbidden" "" { target c++1z } 6 }
+ // { dg-warning "deprecated" "" { target { ! c++1z } } .-1 }
+ // { dg-error "forbidden" "" { target c++1z } .-2 }
}
// PR c++/14401
struct { struct { int& i ; } bar ; } foo ; // { dg-error "deleted|uninitialized" "uninit" }
-// { dg-warning "unnamed" "anon" { target { ! c++11 } } 3 }
-// { dg-message "should be initialized" "ref-uninit" { target { ! c++11 } } 3 }
+// { dg-warning "unnamed" "anon" { target { ! c++11 } } .-1 }
+// { dg-message "should be initialized" "ref-uninit" { target { ! c++11 } } .-2 }
// PR c++/52671
// { dg-do compile }
__attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" "ignored" }
-// { dg-message "must follow the" "must follow" { target *-*-* } 3 }
+// { dg-message "must follow the" "must follow" { target *-*-* } .-1 }
void foo() {
printf("abc"); // { dg-error "3:'printf' was not declared" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 12 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
}
};
const int Bar::three = 3; // { dg-warning "redeclared without dllimport" }
-// { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } 21 }
+// { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } .-1 }
const Baz Bar::null_baz; // { dg-warning "redeclared without dllimport" }
struct A { };
int main() { b: A() && && b; } // { dg-error "operand types are 'A' and 'void\\*'" }
-// { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 }
+// { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } .-1 }
int asm; // { dg-error "before .asm." }
int typeof; // { dg-error "expected" "expected" }
-// { dg-error "multiple types" "multiple" { target *-*-* } 8 }
-// { dg-error "declaration" "declaration" { target *-*-* } 8 }
+// { dg-error "multiple types" "multiple" { target *-*-* } .-1 }
+// { dg-error "declaration" "declaration" { target *-*-* } .-2 }
const static char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
const static char16_t c7 = L'a';
const static char16_t c8 = L'\u2029';
-const static char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } 16 } */
- /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } 16 } */
+const static char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } . } */
+ /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {}
char d[i] ;
begin(d); // { dg-error "no matching function" "" }
- // { dg-message "(candidate|valid template argument)" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|valid template argument)" "candidate note" { target *-*-* } .-1 }
}
#pragma omp parallel
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 12 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp parallel
for (i = 0; i < 10; ++i)
{
bad2: ; // { dg-error "jump" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 20 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp for
goto bad2; // { dg-message "from here" }
}
bad2:; // { dg-error "jump" }
- // { dg-message "exits OpenMP" "" { target *-*-* } 28 }
+ // { dg-message "exits OpenMP" "" { target *-*-* } .-1 }
goto bad3; // { dg-message "from here" }
#pragma omp sections
{
bad3: ; // { dg-error "jump" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 34 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp sections
#pragma omp master
{
bad1: // { dg-error "jump" }
- // { dg-message "exits OpenMP" "" { target *-*-* } 12 }
+ // { dg-message "exits OpenMP" "" { target *-*-* } .-1 }
return; // { dg-error "invalid exit" }
}
}
f4 ()
{
#pragma omp for linear (i:1) linear (j:2) collapse(2) // { dg-error "iteration variable .i. should not be linear" }
- for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 35 }
+ for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } .-1 }
for (j = 0; j < 32; j+=2)
;
}
void
f6 ()
{
- #pragma omp parallel for linear (i:1) collapse(2) linear (j:2) // { dg-error "iteration variable .i. should not be linear" "" { target *-*-* } 54 }
+ #pragma omp parallel for linear (i:1) collapse(2) linear (j:2) // { dg-error "iteration variable .i. should not be linear" "" { target *-*-* } .+1 }
for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" }
for (j = 0; j < 32; j+=2)
;
f10 ()
{
#pragma omp for linear (i:1) linear (j:2) collapse(2) // { dg-error "iteration variable .i. should not be linear" }
- for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 90 }
+ for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } .-1 }
for (j = 0; j < 32; j+=2)
;
}
void
f12 ()
{
- #pragma omp parallel for linear (i:1) collapse(2) linear (j:2) // { dg-error "iteration variable .i. should not be linear" "" { target *-*-* } 111 }
+ #pragma omp parallel for linear (i:1) collapse(2) linear (j:2) // { dg-error "iteration variable .i. should not be linear" "" { target *-*-* } .+1 }
for (i = 0; i < 32; i++) // { dg-error "iteration variable .j. should not be linear" }
for (j = 0; j < 32; j+=2)
;
#pragma omp target
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 13 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp target
{
#pragma omp target // { dg-warning "statement will never be executed" }
{ case 0:; } // { dg-error "jump" }
- // { dg-message "enters" "" { target *-*-* } 28 }
+ // { dg-message "enters" "" { target *-*-* } .-1 }
}
}
#pragma omp target data map(tofrom: y)
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 13 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp target data map(tofrom: y)
{
#pragma omp target data map(tofrom: y) // { dg-warning "statement will never be executed" }
{ case 0:; } // { dg-error "jump" }
- // { dg-message "enters" "" { target *-*-* } 28 }
+ // { dg-message "enters" "" { target *-*-* } .-1 }
}
}
#pragma omp taskgroup
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 13 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp taskgroup
{
#pragma omp taskgroup // { dg-warning "statement will never be executed" }
{ case 0:; } // { dg-error "jump" }
- // { dg-message "enters" "" { target *-*-* } 28 }
+ // { dg-message "enters" "" { target *-*-* } .-1 }
}
}
#pragma omp target teams
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 13 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp target teams
#pragma omp teams
{
bad2: ; // { dg-error "jump to label" }
- // { dg-message "enters OpenMP" "" { target *-*-* } 46 }
+ // { dg-message "enters OpenMP" "" { target *-*-* } .-1 }
}
#pragma omp target
#pragma omp target // { dg-warning "statement will never be executed" }
#pragma omp teams
{ case 0:; } // { dg-error "jump" }
- // { dg-message "enters" "" { target *-*-* } 63 }
+ // { dg-message "enters" "" { target *-*-* } .-1 }
}
}
void foo0() = 0; // { dg-error "like a variable" }
virtual void foo1() = 0; // { dg-error "1:'virtual' outside class" }
-// { dg-error "like a variable" "" { target *-*-* } 6 }
+// { dg-error "like a variable" "" { target *-*-* } .-1 }
struct A
{
void foo2() = 0; // { dg-error "non-virtual" }
int a[] = 0; // { dg-error "5:initializer fails to determine size" }
-// { dg-error "11:array must be initialized" "" { target *-*-* } 1 }
+// { dg-error "11:array must be initialized" "" { target *-*-* } .-1 }
int foo();
int a[] = foo(); // { dg-error "14:initializer fails to determine size" }
-// { dg-error "14:array must be initialized" "" { target *-*-* } 2 }
+// { dg-error "14:array must be initialized" "" { target *-*-* } .-1 }
// { dg-do compile { target c++11 } }
class B // { dg-message "implicitly deleted" }
- // { dg-error "uninitialized" "" { target c++11 } 4 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const v_; // { dg-message "should be initialized" }
};
struct D : B {}; // { dg-error "deleted" }
class A // { dg-message "implicitly deleted" }
- // { dg-error "uninitialized" "" { target c++11 } 12 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
};
class bar: public foo { // { dg-error "uninitialized" }
- // { dg-message "implicitly deleted" "" { target c++11 } 8 }
+ // { dg-message "implicitly deleted" "" { target c++11 } .-1 }
private:
int const a; // { dg-message "should be initialized" }
};
int main(int argc, char **argv)
{
bar x; // { dg-error "deleted" "" { target c++11 } }
- // { dg-message "synthesized" "" { target { ! c++11 } } 19 }
+ // { dg-message "synthesized" "" { target { ! c++11 } } .-1 }
}
};
class bar: public foo { // { dg-error "uninitialized" }
- // { dg-message "implicitly deleted" "" { target c++11 } 9 }
+ // { dg-message "implicitly deleted" "" { target c++11 } .-1 }
private:
int &a; // { dg-message "should be initialized" }
};
int main(int argc, char **argv)
{
bar x; // { dg-error "deleted" "" { target c++11 } }
- // { dg-message "synthesized" "" { target { ! c++11 } } 20 }
+ // { dg-message "synthesized" "" { target { ! c++11 } } .-1 }
}
struct T2 {
static const double n = 2; // { dg-error "23:'constexpr' needed" "" { target c++11 } }
- // { dg-error "23:ISO C\\+\\+ forbids" "" { target c++98_only } 43 }
+ // { dg-error "23:ISO C\\+\\+ forbids" "" { target c++98_only } .-1 }
};
struct T3 {
// { dg-do compile }
struct A1 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 4 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const j; // { dg-message "should be initialized" }
};
struct A2 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 10 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const volatile i; // { dg-message "should be initialized" }
};
struct A3 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 16 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
struct A4 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 22 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const& ref; // { dg-message "should be initialized" }
};
struct A5 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 28 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
int const i; // { dg-message "should be initialized" }
};
template <class T> struct S1 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 35 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
T const i; // { dg-message "should be initialized" }
};
template <class T> struct S2 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 41 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
T const volatile i; // { dg-message "should be initialized" }
};
template <class T> struct S3 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 47 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
T& ref; // { dg-message "should be initialized" }
};
template <class T> struct S4 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 53 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
T const i; // { dg-message "should be initialized" }
T& ref; // { dg-message "should be initialized" }
};
struct Y11 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 67 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
};
struct Y22 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 78 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
};
struct Z1 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 89 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
struct Z2 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 95 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
struct Z3 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 101 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
struct Z4 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 107 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
};
union U // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 127 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
// { dg-do compile }
struct S // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 4 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
};
struct S2 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 17 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int& ref; // { dg-message "should be initialized" }
};
};
struct S4 // { dg-message "implicitly deleted" "" { target c++11 } }
- // { dg-error "uninitialized" "" { target c++11 } 38 }
+ // { dg-error "uninitialized" "" { target c++11 } .-1 }
{
int const i; // { dg-message "should be initialized" }
};
struct A
{
static const int i = 0/0 + ""; // { dg-warning "division by zero" }
- // { dg-error "constant|conversion|initializ" "" { target *-*-* } 5 }
+ // { dg-error "constant|conversion|initializ" "" { target *-*-* } .-1 }
static const int j = int(i);
};
// PR c++/29048
class A { int i; }; // { dg-bogus "is private.*is private" }
-// { dg-message "private" "" { target *-*-* } 3 }
+// { dg-message "private" "" { target *-*-* } .-1 }
class B:public A { B() { A::i=0; } }; // { dg-error "within this context" }
namespace N { int i; } // { dg-message "N::i" }
void foo() { i; } // { dg-error "not declared" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 6 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
using namespace N;
void bar() { i; }
One (a); // ok
One (a, b); // ok
One (b); // { dg-error "3:'One' was not declared" }
- // { dg-message "suggested alternatives" "suggested alternative for One" { target *-*-* } 34 }
+ // { dg-message "suggested alternatives" "suggested alternative for One" { target *-*-* } .-1 }
Two (c); // ok
Two (a, c); // ok
Two (a); // { dg-error "3:'Two' was not declared" }
- // { dg-message "suggested alternatives" "suggested alternative for Two" { target *-*-* } 39 }
+ // { dg-message "suggested alternatives" "suggested alternative for Two" { target *-*-* } .-1 }
Two (a, a); // error masked by earlier error
Two (b); // error masked by earlier error
Two (a, b); // error masked by earlier error
Three (b); // ok
Three (a, b); // ok
Three (a); // { dg-error "3:'Three' was not declared" }
- // { dg-message "suggested alternatives" "suggested alternative for Three" { target *-*-* } 47 }
+ // { dg-message "suggested alternatives" "suggested alternative for Three" { target *-*-* } .-1 }
}
{
using N::bar;
baz++; // { dg-error "'baz' was not declared in this scope" }
-} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } 25 }
+} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } .-1 }
int
bar ()
{
using M::bar;
baz (); // { dg-error "'baz' was not declared in this scope" }
-} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } 47 }
+} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } .-1 }
namespace O
{
using O::foo;
using P::bar;
fooo (); // { dg-error "'fooo' was not declared in this scope" }
- // { dg-message "note: suggested alternative: 'foo'" "" { target *-*-* } 73 }
+ // { dg-message "note: suggested alternative: 'foo'" "" { target *-*-* } .-1 }
baz (); // { dg-error "'baz' was not declared in this scope" }
-} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } 75 }
+} // { dg-message "note: suggested alternative: 'bar'" "" { target *-*-* } .-1 }
namespace N { namespace M { int foo; } } // { dg-message "N::M::foo" }
int f (void) { return N::foo; } // { dg-error "not a member" }
-// { dg-message "suggested alternative" "missing namespace" { target *-*-* } 4 }
+// { dg-message "suggested alternative" "missing namespace" { target *-*-* } .-1 }
int g (void) { return ::foo; } // { dg-error "not been declared" }
-// { dg-message "suggested alternative" "omitted namespace" { target *-*-* } 7 }
+// { dg-message "suggested alternative" "omitted namespace" { target *-*-* } .-1 }
using namespace N;
struct ::S s; // { dg-bogus "ambiguous.*ambiguous" "duplicate error" }
-// { dg-error "reference to 'S' is ambiguous|invalid type" "" { target *-*-* } 17 }}
+// { dg-error "reference to 'S' is ambiguous|invalid type" "" { target *-*-* } .-1 }}
template <typename T> struct B : A<T> // { dg-error "incomplete" }
{
using A<T>::i; // { dg-error "incomplete" "incomplete" }
- // { dg-error "using" "using" { target *-*-* } 8 }
+ // { dg-error "using" "using" { target *-*-* } .-1 }
};
B<void> b; // { dg-message "required" }
class C
{
auto union // { dg-error "storage class" "" { target { ! c++11 } } }
- { // { dg-error "auto" "" { target c++11 } 5 }
+ { // { dg-error "auto" "" { target c++11 } .-1 }
int a;
}; // { dg-error "multiple types" "" { target c++11 } }
register union // { dg-error "storage class" }
// { dg-do compile }
int x[1/0]; // { dg-warning "division by zero" }
- // { dg-error "constant" "constant" { target *-*-* } 4 }
+ // { dg-error "constant" "constant" { target *-*-* } .-1 }
struct A // { dg-message "note" }
{
A(void x); // { dg-error "invalid use|incomplete type|candidates" }
- // { dg-message "" "match candidate text" { target *-*-* } 5 }
+ // { dg-message "" "match candidate text" { target *-*-* } .-1 }
};
struct B : A {}; // { dg-error "no matching function for call|deleted" }
// { dg-options "" }
S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids declaration" "decl" }
-// { dg-error "only constructors" "constructor" { target *-*-* } 5 }
+// { dg-error "only constructors" "constructor" { target *-*-* } .-1 }
{
A a;
a + a; // { dg-error "ambiguous" "ambiguous" }
- // { dg-message "operator" "match candidate text" { target *-*-* } 15 }
+ // { dg-message "operator" "match candidate text" { target *-*-* } .-1 }
}
{
const int i = 42;
A()(i); // { dg-message "<conversion>" }
- // { dg-error "qualifiers" "" { target *-*-* } 13 }
+ // { dg-error "qualifiers" "" { target *-*-* } .-1 }
}
// { dg-prune-output "no match" }
void MainWindow::update_status(Result result) {
switch (result) {
status_frame.modify_bg(Gtk::STATE_NORMAL,Gdk::Color::Color("green")); // { dg-error "" }
- // { dg-warning "statement will never be executed" "" { target *-*-* } 37 }
+ // { dg-warning "statement will never be executed" "" { target *-*-* } .-1 }
status_frame.modify_bg(Gtk::STATE_NORMAL,Gdk::Color::Color("red")); // { dg-error "" }
status_label.set_text("Out of memory");
}
B *bp;
N::A *ap;
f (bp); // { dg-error "3:'f' was not declared" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 16 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
f (ap);
}
const String& b,
bool ignoreCase) {
return ignoreCase ? equalIgnoringCase(a, b) : (a == b); } // { dg-error "ambiguous" }
-// { dg-message "note" "note" { target *-*-* } 15 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
int test (void)
{
low (5, 6); // { dg-error "no matching function" }
- // { dg-message "(candidate|3 arguments, 2 provided)" "" { target *-*-* } 11 }
+ // { dg-message "(candidate|3 arguments, 2 provided)" "" { target *-*-* } .-1 }
high (5, 6, 7, 8); // { dg-error "no matching function" }
- // { dg-message "(candidate|3 arguments, 4 provided)" "" { target *-*-* } 13 }
+ // { dg-message "(candidate|3 arguments, 4 provided)" "" { target *-*-* } .-1 }
}
void baz() {
bar(foo); // { dg-error "<unresolved overloaded function type>" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 8 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
void abort (void) throw (); // { dg-message "previous" }
void _exit (int) throw (); // { dg-error "conflicts" "conflicts" }
- // { dg-message "void _exit" "_exit" { target *-*-* } 49 }
+ // { dg-message "void _exit" "_exit" { target *-*-* } .-1 }
extern "C" void c1 (void) throw ();
void C1 (void) throw (); // { dg-error "conflicts" "conflicts" }
- // { dg-message "void C1" "C1" { target *-*-* } 53 }
+ // { dg-message "void C1" "C1" { target *-*-* } .-1 }
extern "C" void c2 (void) throw ();
void C2 (void) throw (); // { dg-message "previous" }
// { dg-options "-fshow-column" }
ACE_Process_Descriptor::ACE_Process_Descriptor () :
- // { dg-error "does not name a type" "no type" { target *-*-* } 4 }
+ // { dg-error "does not name a type" "no type" { target *-*-* } .-1 }
process_ (0)
{
}
template <typename... T> struct A // { dg-warning "variadic templates" }
{
static T &t; // { dg-error "not expanded with" "not expanded" }
- // { dg-message "T" "T" { target *-*-* } 7 }
+ // { dg-message "T" "T" { target *-*-* } .-1 }
static const int i = sizeof (++t); // { dg-error "was not declared in this scope" }
};
template <class E> class initializer_list {};
template <int N> struct D { D(initializer_list<int>) {} };
D<0> d {1, 2, 3}; // { dg-error "constructor|no matching" }
- // { dg-warning "initializer list" "" { target *-*-* } 8 }
+ // { dg-warning "initializer list" "" { target *-*-* } .-1 }
}
void method(void) {
typename Foo<::B>::template Nested<::B> n; // { dg-error "17:'<::' cannot begin" "17-begin" { target { ! c++11 } } }
-// { dg-message "17:'<:' is an alternate spelling" "17-alt" { target { ! c++11 } } 19 }
-// { dg-error "39:'<::' cannot begin" "39-begin" { target { ! c++11 } } 19 }
-// { dg-message "39:'<:' is an alternate spelling" "39-alt" { target { ! c++11 } } 19 }
+// { dg-message "17:'<:' is an alternate spelling" "17-alt" { target { ! c++11 } } .-1 }
+// { dg-error "39:'<::' cannot begin" "39-begin" { target { ! c++11 } } .-2 }
+// { dg-message "39:'<:' is an alternate spelling" "39-alt" { target { ! c++11 } } .-3 }
n.template Nested<B>::method();
n.template Nested<::B>::method(); // { dg-error "22:'<::' cannot begin" "error" { target { ! c++11 } } }
-// { dg-message "22:'<:' is an alternate" "note" { target { ! c++11 } } 24 }
+// { dg-message "22:'<:' is an alternate" "note" { target { ! c++11 } } .-1 }
Nested<B>::method();
Nested<::B>::method(); // { dg-error "11:'<::' cannot begin" "error" { target { ! c++11 } } }
-// { dg-message "11:'<:' is an alternate" "note" { target { ! c++11 } } 27 }
+// { dg-message "11:'<:' is an alternate" "note" { target { ! c++11 } } .-1 }
}
};
template <int N> struct Foo2 {};
template struct Foo2<::B>; // { dg-error "21:'<::' cannot begin" "begin" { target { ! c++11 } } }
-// { dg-message "21:'<:' is an alternate" "alt" { target { ! c++11 } } 33 }
-// { dg-message "25:type/value mismatch" "mismatch" { target *-*-* } 33 }
-// { dg-message "25:expected a constant" "const" { target *-*-* } 33 }
+// { dg-message "21:'<:' is an alternate" "alt" { target { ! c++11 } } .-1 }
+// { dg-message "25:type/value mismatch" "mismatch" { target *-*-* } .-2 }
+// { dg-message "25:expected a constant" "const" { target *-*-* } .-3 }
int value = 0;
void func(void)
{
Foo<::B> f; // { dg-error "cannot begin" "begin" { target { ! c++11 } } }
-// { dg-message "alternate spelling" "alt" { target { ! c++11 } } 42 }
+// { dg-message "alternate spelling" "alt" { target { ! c++11 } } .-1 }
f.Foo<B>::method();
f.Foo<::B>::method(); // { dg-error "8:cannot begin" "begin" { target { ! c++11 } } }
-// { dg-message "8:alternate spelling" "alt" { target { ! c++11 } } 45 }
+// { dg-message "8:alternate spelling" "alt" { target { ! c++11 } } .-1 }
// Check cases where we the token sequence is the correct one, but there
// was no digraph or whitespaces in the middle, so we should not emit
}
template struct Foo<::B>; // { dg-error "20:'<::' cannot begin" "begin" { target { ! c++11 } } }
-// { dg-message "20:is an alternate" "alt" { target { ! c++11 } } 64 }
+// { dg-message "20:is an alternate" "alt" { target { ! c++11 } } .-1 }
// On the first error message, an additional note about the use of
// -fpermissive should be present
struct Foo {};
Foo<::B> foo; // { dg-bogus "error" "error in place of warning" { target { ! c++11 } } }
-// { dg-warning "4: '<::' cannot begin a template-argument list" "warning <::" { target { ! c++11 } } 11 }
-// { dg-message "4:'<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target { ! c++11 } } 11 }
+// { dg-warning "4: '<::' cannot begin a template-argument list" "warning <::" { target { ! c++11 } } .-1 }
+// { dg-message "4:'<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target { ! c++11 } } .-2 }
// }
}; // { dg-error "2:expected '.' at end of input" "at end of input" }
- // { dg-error "1:expected primary-expression before '.' token" "primary" { target *-*-* } 22 }
- // { dg-error "1:expected unqualified-id" "unqualified-id" { target *-*-* } 22 }
+ // { dg-error "1:expected primary-expression before '.' token" "primary" { target *-*-* } .-1 }
+ // { dg-error "1:expected unqualified-id" "unqualified-id" { target *-*-* } .-2 }
template <int>
struct Foo {};
-Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } 11 }
-// { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } 11 }
-// { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } 11 }
-// { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } 11 }
+Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } . }
+// { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } .-1 }
+// { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } .-2 }
+// { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } .-3 }
// Check that we do not complain about an unused
// compiler-generated variable.
A& = a; // { dg-error "6:expected unqualified-id before '=' token" "6" }
- // { dg-error "8:'a' was not declared in this scope" "8" { target *-*-* } 10 }
+ // { dg-error "8:'a' was not declared in this scope" "8" { target *-*-* } .-1 }
}
void foo()
{
if (({int c[2];})) ; // { dg-error "7:ISO C.. forbids" "7" }
- // { dg-error "17:could not convert" "17" { target *-*-* } 6 }
+ // { dg-error "17:could not convert" "17" { target *-*-* } .-1 }
}
void bar()
{
if (({})); // { dg-error "7:ISO C.. forbids" "7" }
- // { dg-error "11:could not convert" "11" { target *-*-* } 12 }
+ // { dg-error "11:could not convert" "11" { target *-*-* } .-1 }
}
{
typedef A<T>::foo type; // { dg-error "typename" }
A<T>::bar b; // { dg-error "typename" "typename" }
-} // { dg-error "expected ';'" "expected" { target *-*-* } 14 }
+} // { dg-error "expected ';'" "expected" { target *-*-* } .-1 }
// PR c++/36353
template <class T> struct B
void f()
{
A<T>::baz z; // { dg-error "typename" "typename" }
- } // { dg-error "expected ';'" "expected" { target *-*-* } 22 }
+ } // { dg-error "expected ';'" "expected" { target *-*-* } .-1 }
};
// PR c++/40738
struct A
{
friend int i = 0; // { dg-error "cannot be declared friend" }
-// { dg-error "non-static data member" "" { target { ! c++11 } } 5 }
+// { dg-error "non-static data member" "" { target { ! c++11 } } .-1 }
};
template <int> struct B
{
enum { e = I * A<I-1>::B }; // { dg-error "dependent-name" "depname" }
- // { dg-message "note" "note" { target *-*-* } 9 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
};
template <typename T> void foo()
{
typedef typename A<T>::B<T>::X Y; // { dg-error "non-template" "non" }
- // { dg-error "not declare" "decl" { target *-*-* } 15 }
- // { dg-message "note" "note" { target *-*-* } 15 }
+ // { dg-error "not declare" "decl" { target *-*-* } .-1 }
+ // { dg-message "note" "note" { target *-*-* } .-2 }
}
void bar()
z = __complex__ (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '__complex__'" "primary-expression" }
z = __complex__ (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '__complex__'" "primaty-expression" }
- // { dg-error "at end of input" "end" { target *-*-* } 10 }
+ // { dg-error "at end of input" "end" { target *-*-* } .-1 }
z = _Complex (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '_Complex'" "primary-expression" }
z = _Complex (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '_Complex'" "primary-expression" }
- // { dg-error "at end of input" "end" { target *-*-* } 10 }
+ // { dg-error "at end of input" "end" { target *-*-* } .-1 }
x++; // { dg-warning "trying prefix operator" }
y++; // { dg-warning "trying prefix operator" }
- // { dg-error "no match" "" { target *-*-* } 14 }
+ // { dg-error "no match" "" { target *-*-* } .-1 }
}
X x;
Y y;
x++; // { dg-bogus "trying prefix operator" }
- // { dg-error "fpermissive" "" { target *-*-* } 12 }
+ // { dg-error "fpermissive" "" { target *-*-* } .-1 }
y++; // { dg-bogus "trying prefix operator" }
- // { dg-error "fpermissive" "" { target *-*-* } 14 }
+ // { dg-error "fpermissive" "" { target *-*-* } .-1 }
}
// { dg-do compile }
0''; // { dg-error "empty character constant" }
-// { dg-error "expected unqualified-id before numeric constant" "" { target *-*-* } 4 }
+// { dg-error "expected unqualified-id before numeric constant" "" { target *-*-* } .-1 }
struct S {} f(); // { dg-error "return" "err" }
-// { dg-message "note" "note" { target *-*-* } 1 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
struct T {} *g(); // { dg-error "return" }
-// { dg-message "note" "note" { target *-*-* } 3 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
struct U {} h() {} // { dg-error "return" }
-// { dg-message "note" "note" { target *-*-* } 5 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
struct V {} *i() {} // { dg-error "return" }
-// { dg-message "note" "note" { target *-*-* } 7 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
struct W {} (*p) (); // { dg-error "return" }
-// { dg-message "note" "note" { target *-*-* } 9 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
template <typename T> class A;
template <typename T> class A<T>::B; // { dg-error "declaration" "err" }
-// { dg-warning "declaration" "warn" { target *-*-* } 6 }
+// { dg-warning "declaration" "warn" { target *-*-* } .-1 }
template <bool b, typename T>
struct Y : Outer<b>::Inner<T> {}; // { dg-error "used as template" "temp" }
-// { dg-error "expected" "exp" { target *-*-* } 16 }
-// { dg-message "note" "note" { target *-*-* } 16 }
+// { dg-error "expected" "exp" { target *-*-* } .-1 }
+// { dg-message "note" "note" { target *-*-* } .-2 }
template <typename T>
void f() {
g(); // { dg-error "must be available" "err" }
- // { dg-message "note" "note" { target *-*-* } 3 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
h(3); // { dg-error "must be available" }
}
// note: I is nested type in X, not Y!
template <int dim>
Y<dim>::I::I () {} // { dg-error "dependent typedef" "typedef" }
-// { dg-error "no type|dependent type" "no type" { target *-*-* } 13 }
+// { dg-error "no type|dependent type" "no type" { target *-*-* } .-1 }
template struct Y<1>;
void normal_func (char c, char __attribute__((user("param"))) c2)
{
} // { dg-warning "attribute 'user' on param 'c' of function normal_func" }
-// { dg-warning "attribute 'user' on param 'c2' of function normal_func" "" { target *-*-* } 7 }
+// { dg-warning "attribute 'user' on param 'c2' of function normal_func" "" { target *-*-* } .-1 }
class Foo {
void method (char __attribute__((user("param"))) c);
int bar()
{
return foo; // { dg-error "was not declared" }
- // { dg-message "maximum limit of 4 namespaces" "maximum limit" { target *-*-* } 34 }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 34 }
+ // { dg-message "maximum limit of 4 namespaces" "maximum limit" { target *-*-* } .-1 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-2 }
}
template<int> void foo()
{
!typeid(void); // { dg-error "!typeid\\(void\\)|candidate is" }
- // { dg-message "" "match candidate text" { target *-*-* } 10 }
+ // { dg-message "" "match candidate text" { target *-*-* } .-1 }
}
int test5 (struct foo *ptr)
{
return ptr->this_is_unlike_any_of_the_fields; /* { dg-bogus "did you mean" } */
- /* { dg-error "has no member named" "" { target *-*-* } 40 } */
+ /* { dg-error "has no member named" "" { target *-*-* } .-1 } */
}
union u
/* Verify that gcc doesn't offer nonsensical suggestions. */
nonsensical_suggestion_t var; /* { dg-bogus "did you mean" } */
-/* { dg-error "'nonsensical_suggestion_t' does not name a type" "" { target { *-*-* } } 72 } */
+/* { dg-error "'nonsensical_suggestion_t' does not name a type" "" { target { *-*-* } } .-1 } */
/* { dg-begin-multiline-output "" }
nonsensical_suggestion_t var;
^~~~~~~~~~~~~~~~~~~~~~~~
};
struct I2 : public I1 {
X x; // { dg-error "does not name a type" "name" }
- // { dg-message "note" "note" { target *-*-* } 10 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
};
void f()
{
A::A a; // { dg-error "constructor" "constructor" }
-} // { dg-error "" "error cascade" { target *-*-* } 23 } error cascade
+} // { dg-error "" "error cascade" { target *-*-* } .-1 } error cascade
}
namespace N2 {
template<typename T> struct A
{
template<template<T> class> struct B {}; // { dg-error "void|mismatch|expected" }
- // { dg-bogus "not supported" "" { target *-*-* } 5 }
+ // { dg-bogus "not supported" "" { target *-*-* } .-1 }
template<T> struct C; // { dg-error "void" }
B<C> b;
};
int main()
{
A().operator int(); // { dg-error "operator int" }
- // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } .-1 }
}
{
typedef typename A<T>::B X;
X::Y; // { dg-error "not a base type" }
-// { dg-warning "deprecated" "" { target *-*-* } 15 }
+// { dg-warning "deprecated" "" { target *-*-* } .-1 }
};
C<void> c;
//PR c++/27668
template<typename class T, T = T()> // { dg-error "nested-name-specifier|two or more|valid type" }
-// { dg-error "cast" "" { target c++98_only } 3 }
+// { dg-error "cast" "" { target c++98_only } .-1 }
struct A {};
template<int> void foo(A<int>); // { dg-error "template argument 2" "" { target c++98_only } }
bind (&bar::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 42 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 44 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 47 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&foo::barf);
bindn (&barf);
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 58 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bind (&bar::bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 60 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 63 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&bar::bark);
bindn (&bark);
bind (&barT::baikt);
bind (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 94 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bind (&foo::barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 96 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&barf); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 99 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&foo::barf);
bindn (&barf);
bind (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 110 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bind (&barT::bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 112 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&bark); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 115 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
bindm (&barT::bark);
bindn (&bark);
foo()
{
union { struct { }; }; // { dg-error "prohibits anonymous struct" "anon" }
- // { dg-error "not inside" "not inside" { target *-*-* } 7 }
+ // { dg-error "not inside" "not inside" { target *-*-* } .-1 }
}
};
template<int> int A<0>::i(0); // { dg-error "template" "error" }
-// { dg-message "note" "note" { target *-*-* } 9 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
A<0> a;
template<class T, class U>
void foo(typename C1<T>::C2<U>::Type *) { } // { dg-error "template" "error " }
-// { dg-message "note" "note" { target *-*-* } 8 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
{
D d;
f(d); // { dg-error "no matching" }
-} // { dg-message "'A<T>' is an ambiguous base" "" { target *-*-* } 18 }
+} // { dg-message "'A<T>' is an ambiguous base" "" { target *-*-* } .-1 }
{
S<1000> t;
g(t); // { dg-error "no matching" }
-} // { dg-message "mismatched types 'long long int' and 'int'" "" { target *-*-* } 12 }
+} // { dg-message "mismatched types 'long long int' and 'int'" "" { target *-*-* } .-1 }
{
s<int>::t y;
cout << y; // { dg-error "" }
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 28 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
fptr zeroptr = 0;
template<typename T, fptr F> struct foo { };
template<typename T> struct foo<T,zeroptr> { };
-// { dg-error "not a valid template argument" "not valid" { target *-*-* } 6 }
-// { dg-message "must be the address" "must be the address " { target *-*-* } 6 }
+// { dg-error "not a valid template argument" "not valid" { target *-*-* } .-1 }
+// { dg-message "must be the address" "must be the address " { target *-*-* } .-2 }
// The rest is needed to trigger the ICE in 4.0 to 4.3:
void f() { }
PCVector2<T> operator- (const PCVector2<T> &ov) const
{
return PCVector2<T>(ov.xFIELD, ov.yFIELD); // { dg-error "matching" }
- // { dg-message "(candidate|expects 1 argument, 2 provided|cannot convert)" "candidate note" { target *-*-* } 7 }
+ // { dg-message "(candidate|expects 1 argument, 2 provided|cannot convert)" "candidate note" { target *-*-* } .-1 }
}
T xFIELD, yFIELD;
template< typename _A > void S::foo() {}
template void S::foo< 0 >(); // { dg-error "no definition available" "no def" }
- // { dg-message "required" "instantiated" { target *-*-* } 30 }
+ // { dg-message "required" "instantiated" { target *-*-* } .-1 }
}
struct S
{
S() : S() {} // { dg-message "delegating constructors" }
-}; // { dg-error "delegates to itself" "" { target *-*-* } 5 }
+}; // { dg-error "delegates to itself" "" { target *-*-* } .-1 }
S<int> s;
int _j;
};
A<U,SubB1>::SubA<SubB2> _a; // { dg-error "not a base type" "not base" }
- // { dg-message "note" "note" { target *-*-* } 20 }
- // { dg-error "non-template" "non-template" { target *-*-* } 20 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
+ // { dg-error "non-template" "non-template" { target *-*-* } .-2 }
};
void func(void)
{
(void)A<T>::type(); // { dg-error "non-type" "non-type" }
-// { dg-message "if a type" "note" { target *-*-* } 15 }
+// { dg-message "if a type" "note" { target *-*-* } .-1 }
}
template void func<float>(void); // { dg-message "required from here" }
template<typename T, typename T2>
int foo(T a, T2& b, T2 c) {return a + b;} // { dg-message "template" }
int foo(char*, S&); // { dg-message "foo" }
-// { dg-message "candidate expects 2 arguments, 3 provided" "arity" { target *-*-* } 8 }
+// { dg-message "candidate expects 2 arguments, 3 provided" "arity" { target *-*-* } .-1 }
int foo2(int x)
{
S s={1,2};
char c;
foo(c, 2, c); // { dg-error "no matching function" }
- // { dg-message "(candidate|deduced conflicting types for)" "candidate note" { target *-*-* } 15 }
+ // { dg-message "(candidate|deduced conflicting types for)" "candidate note" { target *-*-* } .-1 }
}
int main ()
{
Get<&B::I>(); // { dg-error "not a valid template argument" "not valid" }
- // { dg-error "no match" "no match" { target *-*-* } 18 }
- // { dg-message "note" "note" { target *-*-* } 18 }
+ // { dg-error "no match" "no match" { target *-*-* } .-1 }
+ // { dg-message "note" "note" { target *-*-* } .-2 }
Get<&D::I>(); // { dg-error "not a valid template argument" "not valid" }
- // { dg-error "no match" "no match" { target *-*-* } 21 }
- // { dg-message "note" "note" { target *-*-* } 21 }
+ // { dg-error "no match" "no match" { target *-*-* } .-1 }
+ // { dg-message "note" "note" { target *-*-* } .-2 }
}
{
T::C (); // { dg-error "parsed as a non-type|if a type is meant" }
T::template B<false>(); // { dg-error "parsed as a non-type" "non-type" }
- // { dg-message "if a type" "if a type" { target *-*-* } 20 }
+ // { dg-message "if a type" "if a type" { target *-*-* } .-1 }
}
void bar()
};
template <> void A<int>::f (int); // { dg-error "" }
-// { dg-message "need 2" "" { target *-*-* } 21 }
+// { dg-message "need 2" "" { target *-*-* } .-1 }
template <> template <> void A<int>::f (int);
template <> void A<int>::f2 (int);
template <typename T> struct A
{
static const int t[1][1]={{0}}; // { dg-error "20:'constexpr' needed" "" { target c++11 } }
- // { dg-error "20:invalid in-class" "" { target c++98_only } 3 }
- // { dg-error "28:a brace-enclosed" "" { target c++98_only } 3 }
+ // { dg-error "20:invalid in-class" "" { target c++98_only } .-1 }
+ // { dg-error "28:a brace-enclosed" "" { target c++98_only } .-2 }
};
{
template<> void
vector<int, allocator<int> >::swap(vector<int, allocator<int> >&) { } // { dg-error "" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 22 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
}
{
public:
static int A::* const p = P; // { dg-error "25:'constexpr' needed" "" { target c++11 } }
- // { dg-error "25:invalid in-class" "" { target c++98_only } 7 }
- // { dg-error "29:template parameter" "" { target c++98_only } 7 }
+ // { dg-error "25:invalid in-class" "" { target c++98_only } .-1 }
+ // { dg-error "29:template parameter" "" { target c++98_only } .-2 }
};
class A
template<int N> struct X {};
void g() {
f1(5l, X<5>()); // { dg-error "no matching" }
- // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 20 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 }
f2(X<5>(), 5);
f3(X<5>(), 5l); // { dg-error "no matching" }
- // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 23 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 }
f4(5, X<5>());
f4(5l, X<5>()); // { dg-error "no matching" }
- // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 26 }
+ // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 }
f4((short)5, X<5>());
}
// PR c++/18155
template<int> typedef struct A; // { dg-warning "'typedef' was ignored" }
- // { dg-error "" "" { target *-*-* } 3 }
+ // { dg-error "" "" { target *-*-* } .-1 }
class ctype2 : public __ctype_abstract_base<_CharT>
{
typedef mask mask; // { dg-error "does not name a type" "no type" }
- // { dg-message "note" "note" { target *-*-* } 24 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
int main() {
mFunction(&MyClass::mMethod);
mFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 28 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
mFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 30 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
mFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 32 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 35 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cFunction(&MyClass::cMethod);
cFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 38 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 40 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
vFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 43 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
vFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 45 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
vFunction(&MyClass::vMethod);
vFunction(&MyClass::cvMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 48 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cvFunction(&MyClass::mMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 51 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cvFunction(&MyClass::cMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 53 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cvFunction(&MyClass::vMethod); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 55 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
cvFunction(&MyClass::cvMethod);
return 0;
Foo3 (&Baz);
Foo3 (&Baz, &Baz); // { dg-error "no matching function" "" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 21 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
}
{
Foo (f);
Baz (f); // { dg-error "no matching function" "" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 13 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
}
int main () {
f (*x, &X::g); // { dg-error "no matching function" }
- // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 16 }
+ // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } .-1 }
}
int i;
int A[i][i];
foo(A); // { dg-error "" }
- // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } 9 }
+ // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } .-1 }
}
{
switch (i)
case 0 * (1 / 0): /* { dg-warning "division by zero" } */
- ; /* { dg-error "is not a constant.expression" "" { target *-*-* } 8 } */
+ ; /* { dg-error "is not a constant.expression" "" { target *-*-* } .-1 } */
}
{
if (b != 2)
a <<= b;
- // { dg-error "5 << -2.. is negative" "" { target *-*-* } 12 }
- // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } 12 }
- // { dg-error "-2 << 4.. is negative" "" { target *-*-* } 12 }
+ // { dg-error "5 << -2.. is negative" "" { target *-*-* } .-1 }
+ // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } .-2 }
+ // { dg-error "-2 << 4.. is negative" "" { target *-*-* } .-3 }
return a;
}
{
if (b != 2)
a >>= b;
- // { dg-error "4 >> -1.. is negative" "" { target *-*-* } 35 }
- // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } 35 }
+ // { dg-error "4 >> -1.. is negative" "" { target *-*-* } .-1 }
+ // { dg-error "is >= than the precision of the left operand" "" { target *-*-* } .-2 }
return a;
}
void ml() { if (&t != (S*)0) z(); } // { dg-warning "address" }
void nl() { if (z != (S*)0) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 26 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void pl() { if (z != (ptrfn)0) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 28 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void ql() { if (&d != (int*)0) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 30 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void rl() { if (&s != (U*)0) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 32 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void gr() { if (0 != z) z(); } // { dg-warning "address" }
void hr() { if ((ptrf)0 != z) z(); } // { dg-warning "address" }
void mr() { if ((S*)0 != &t) z(); } // { dg-warning "address" }
void nr() { if ((S*)0 != z) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 43 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void pr() { if ((ptrfn)0 != z) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 45 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void qr() { if ((int*)0 != &d) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 47 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
void rr() { if ((U*)0 != &s) z(); } // { dg-error "comparison" }
-// { dg-warning "address" "" { target *-*-* } 49 }
+// { dg-warning "address" "" { target *-*-* } .-1 }
// { dg-options "-Wconversion-null" }
void foo(const char *);
void bar() { foo(false); } // { dg-warning "pointer type for argument" "" { target { ! c++11 } } }
-// { dg-error "cannot convert" "" { target c++11 } 3 }
+// { dg-error "cannot convert" "" { target c++11 } .-1 }
void func2() {
int* t = false; // { dg-warning "converting 'false' to pointer" "" { target { ! c++11 } } }
-// { dg-error "cannot convert" "" { target c++11 } 9 }
+// { dg-error "cannot convert" "" { target c++11 } .-1 }
int* p;
p = false; // { dg-warning "converting 'false' to pointer" "" { target { ! c++11 } } }
-// { dg-error "cannot convert" "" { target c++11 } 12 }
+// { dg-error "cannot convert" "" { target c++11 } .-1 }
int* r = sizeof(char) / 2; // { dg-error "invalid conversion from" "" { target c++11 } }
func1(false); // { dg-warning "converting 'false' to pointer" "" { target { ! c++11 } } }
-// { dg-error "cannot convert" "" { target c++11 } 15 }
+// { dg-error "cannot convert" "" { target c++11 } .-1 }
int i = NULL; // { dg-warning "converting to non-pointer" }
}
#line 6 "foo.C"
struct Bar { Foo foo; }; // { dg-warning "no linkage" }
-// { dg-bogus "anonymous namespace" "" { target *-*-* } 6 }
+// { dg-bogus "anonymous namespace" "" { target *-*-* } .-1 }
struct Bar2 : Foo { }; // { dg-warning "no linkage" }
-// { dg-bogus "anonymous namespace" "" { target *-*-* } 8 }
+// { dg-bogus "anonymous namespace" "" { target *-*-* } .-1 }
#line 6 "foo.C"
struct Bar { Foo foo; }; // { dg-warning "anonymous namespace" }
-// { dg-bogus "no linkage" "" { target *-*-* } 6 }
+// { dg-bogus "no linkage" "" { target *-*-* } .-1 }
struct Bar2 : Foo { }; // { dg-warning "anonymous namespace" }
-// { dg-bogus "no linkage" "" { target *-*-* } 8 }
+// { dg-bogus "no linkage" "" { target *-*-* } .-1 }
default: break;
}
switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
}
switch (ej)
{
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return;
if (255 >= (unsigned char) 1)
return;
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return 1;
else
return 0;
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return;
if (255 >= (unsigned char) 1)
return;
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return 1;
else
return 0;
void f1 (long s) { } // { dg-warning "15:unused parameter 's'" }
void f2 (long s, int u) { } // { dg-warning "15:unused parameter 's'" }
-// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 6 }
+// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } .-1 }
void f3 (long s);
void f3 (long s) { } // { dg-warning "15:unused parameter 's'" }
void f4 (long s, int u);
void f4 (long s, int u) { } // { dg-warning "15:unused parameter 's'" }
-// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 13 }
+// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } .-1 }
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" "" } */
- /* { dg-warning "'y' is deprecated: Please avoid y" "y" { target *-*-* } 53 } */
- /* { dg-warning "'g2' is deprecated: Please avoid g2" "g2" { target *-*-* } 53 } */
- /* { dg-warning "'g3' is deprecated: Please avoid g3" "g3" { target *-*-* } 53 } */
+ /* { 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 } */
return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated: Please avoid f1" "f1" } */
}
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" "" } */
- /* { dg-warning "'S1::field8' is deprecated: Please avoid field8" "field8" { target *-*-* } 71 } */
+ /* { dg-warning "'S1::field8' is deprecated: Please avoid field8" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int (*pf)() = f1; /* { dg-warning "'INT1 f1\\(\\)' is deprecated" "" } */
z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
- /* { dg-warning "'y' is deprecated" "y" { target *-*-* } 55 } */
- /* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } 55 } */
- /* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } 55 } */
+ /* { dg-warning "'y' is deprecated" "y" { target *-*-* } .-1 } */
+ /* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } .-2 } */
+ /* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } .-3 } */
return f1(); /* { dg-warning "'INT1 f1\\(\\)' is deprecated" "f1" } */
}
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" "" } */
- /* { dg-warning "'S1::field8' is deprecated" "field8" { target *-*-* } 73 } */
+ /* { dg-warning "'S1::field8' is deprecated" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
main (int argc, char **argv)
{
delete a; // { dg-warning "delete" "warn" }
- // { dg-message "note" "note" { target *-*-* } 19 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
return 0;
}
g (void)
{
return - - - - -INT_MIN; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
- /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
+ /* { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 } */
}
g1 (void)
{
return INT_MAX + 1 - INT_MAX; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
- /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
+ /* { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 } */
}
g (void)
{
short int wc = ((short int)1 << 31) - 1; /* { dg-bogus "overflow .* overflow" } */
- /* { dg-warning "overflow" "" { target *-*-* } 8 } */
+ /* { dg-warning "overflow" "" { target *-*-* } .-1 } */
return wc;
}
E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example
in the standard). */
- E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } 14 } */
+ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } . } */
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 24 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* A cast does not constitute overflow in conversion. */
E7 = (char) INT_MAX
};
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 33 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
};
void
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } 54 } */
+/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "invalid conversion from 'int' to 'void*'" "null" { xfail *-*-* } 56 } */
+/* { dg-error "invalid conversion from 'int' to 'void*'" "null" { xfail *-*-* } .-1 } */
void *r = (1 ? 0 : INT_MAX+1); /* { dg-bogus "integer overflow in expression" "" { xfail *-*-* } } */
void
case 0 * (1/0): /* { dg-warning "division by zero" } */
;
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 67 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
;
}
}
E1 = UINT_MAX + 1,
/* Overflow in an unevaluated part of an expression is OK (example
in the standard). */
- E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } 14 } */
+ E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } . } */
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 24 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* A cast does not constitute overflow in conversion. */
E7 = (char) INT_MAX
};
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 33 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
};
void
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } 55 } */
+/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } 58 } */
+/* { dg-warning "invalid conversion from 'int' to 'void" "null" { target *-*-* } .-1 } */
void *r = (1 ? 0 : INT_MAX+1); /* { dg-bogus "integer overflow in expression" "" { xfail *-*-* } } */
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- ; /* { dg-error "division by zero is not a constant expression" "division" { target c++11 } 67 } */
+ ; /* { dg-error "division by zero is not a constant expression" "division" { target c++11 } .-1 } */
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 69 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
;
}
}
in the standard). */
E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } } */
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target c++ } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
- /* { dg-error "enumerator value for 'E5' is not an integer constant" "enum error" { target *-*-* } 21 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
+ /* { dg-error "enumerator value for 'E5' is not an integer constant" "enum error" { target *-*-* } .-2 } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 25 } */
- /* { dg-error "enumerator value for 'E6' is not an integer constant" "enum error" { target *-*-* } 25 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
+ /* { dg-error "enumerator value for 'E6' is not an integer constant" "enum error" { target *-*-* } .-2 } */
/* A cast does not constitute overflow in conversion. */
E7 = (char) INT_MAX
};
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 35 } */
- /* { dg-error "bit-field .* width not an integer constant" "" { target *-*-* } 35 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
+ /* { dg-error "bit-field .* width not an integer constant" "" { target *-*-* } .-2 } */
};
void
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "invalid conversion from 'int' to 'void" "null" { target *-*-* } 58 } */
+/* { dg-error "invalid conversion from 'int' to 'void" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "invalid conversion from 'int' to 'void" "null" { target *-*-* } 61 } */
+/* { dg-error "invalid conversion from 'int' to 'void" "null" { target *-*-* } .-1 } */
void *r = (1 ? 0 : INT_MAX+1); /* { dg-bogus "integer overflow in expression" "" { xfail *-*-* } } */
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- ; /* { dg-error "division by zero is not a constant expression" "division" { target c++11 } 70 } */
+ ; /* { dg-error "division by zero is not a constant expression" "division" { target c++11 } .-1 } */
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 72 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
;
}
}
Y y;
x = 10; // { dg-warning "invalid conversion from .int. to .X." "invalid" }
- // { dg-warning "unspecified" "unspecified" { target *-*-* } 13 }
+ // { dg-warning "unspecified" "unspecified" { target *-*-* } .-1 }
x = 1; // { dg-warning "invalid conversion from .int. to .X." }
x = C; // { dg-error "cannot convert .Y. to .X. in assignment" }
x = D; // { dg-error "cannot convert .Y. to .X. in assignment" }
// { dg-options "-pedantic-errors" }
// { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } }
int main(char a) {} /* { dg-error "first argument of .*main.* should be .int." "int" } */
-/* { dg-error "main.* takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
+/* { dg-error "main.* takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
// { dg-options "" }
// { dg-skip-if "-Wmain not enabled on SPU" { spu-*-* } }
int main(char a) {} /* { dg-warning "first argument of .*main.* should be .int." "int" } */
-/* { dg-warning "main.* takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
+/* { dg-warning "main.* takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
void foo(nicaragua& b) {
peace(b); // { dg-warning "choosing 'nicaragua::operator" "nic" }
- // { dg-warning "conversion" "conv" { target *-*-* } 24 }
- // { dg-message "note" "note" { target *-*-* } 24 }
+ // { dg-warning "conversion" "conv" { target *-*-* } .-1 }
+ // { dg-message "note" "note" { target *-*-* } .-2 }
}
class B : public A {
public:
char* m1 () { C::m1(); return ""; } // { dg-error "cannot call" }
- // { dg-warning "deprecated|forbids converting a string constant" "depr" { target *-*-* } 14 }
+ // { dg-warning "deprecated|forbids converting a string constant" "depr" { target *-*-* } .-1 }
};
int main () {
Vix x;
for (first(x); 0 != x && this->REMOVE_CURRENT != a; next(x, a))
a = operator()(x) == item ? this->REMOVE_CURRENT: this->NORMAL; // { dg-error "" } .*
- // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } 280 }
+ // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } .-1 }
}
template<class T>
bool
Vix x;
for (first(x); 0 != x; next(x)) {
if (operator()(x) == item)// { dg-error "" } .*
- // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } 289 }
+ // { dg-message "(candidate|not derived from)" "candidate note" { target *-*-* } .-1 }
return TRUE;
}
return FALSE;
};
const Regex NDAMName<'L'>::pattern("^[Ll](.*)$", 1);// { dg-error "type/value mismatch" "mismatch" }
-// { dg-message "expected a type" "expected" { target *-*-* } 11 }
-// { dg-warning "deprecated|forbids converting a string constant" "depr" { target *-*-* } 11 }
+// { dg-message "expected a type" "expected" { target *-*-* } .-1 }
+// { dg-warning "deprecated|forbids converting a string constant" "depr" { target *-*-* } .-2 }
unsigned NDAMName<'L'>::sequence_number = 0;// { dg-error "type/value mismatch" "mismatch" }
-// { dg-message "expected a type" "exp" { target *-*-* } 14 }
+// { dg-message "expected a type" "exp" { target *-*-* } .-1 }
try
{
throw A(); // { dg-error "rvalue" "" { target c++14_down } } can't copy
- // { dg-error "thrown expression" "expr" { target c++14_down } 13 }
+ // { dg-error "thrown expression" "expr" { target c++14_down } .-1 }
}
catch (...) { }
}
{
bool b = false;
int i = b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 5 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
if (i != false || b != true)
return 1;
i = b++; // { dg-warning "deprecated" "" { target { ! c++1z } } }
- // { dg-error "forbidden" "" { target c++1z } 9 }
+ // { dg-error "forbidden" "" { target c++1z } .-1 }
if (i != true || b != true)
return 1;
}
A bar; // { dg-error "not declared" "decl" }
if (enum A { one, two, three } foo = one) // { dg-error "defined" "def" }
- // { dg-error "not declared" "expected" { target *-*-* } 41 }
+ // { dg-error "not declared" "expected" { target *-*-* } .-1 }
;
struct B { operator int () { return 2; } };
;
if (int f () = 1) // { dg-warning "extern" "extern" }
- // { dg-error "is initialized like a variable" "var" { target *-*-* } 50 }
+ // { dg-error "is initialized like a variable" "var" { target *-*-* } .-1 }
;
if (int a[2] = {1, 2}) // { dg-error "extended init" "" { target { ! c++11 } } }
void operator delete (A a); // { dg-error "first parameter" }
char * operator char * (int); // { dg-error "return type" "ret" }
-// { dg-error "nonstatic member function" "mem" { target *-*-* } 31 }
+// { dg-error "nonstatic member function" "mem" { target *-*-* } .-1 }
&Thing::FunctionA,
Thing::OverloadFn,
}; // { dg-error "assuming" "assuming" } implicit &
-// { dg-message "note" "note" { target *-*-* } 18 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
};
class Y // { dg-error "1:new types may not be defined in a return type" "err" }
- // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'Y'\\)" "note" { target *-*-* } 17 }
+ // { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'Y'\\)" "note" { target *-*-* } .-1 }
{
private:
X xx;
Y();
}
X::X( int xi ) // { dg-error "14:return type specification for constructor invalid" "err" }
-// { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } 25 }
+// { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } .-1 }
{
x = xi;
}
#endif
inline int max(int a, int b) {return a > b ? a : b;}; // { dg-message "note" }
- // { dg-error "extra ';'" "extra ;" { target *-*-* } 17 }
+ // { dg-error "extra ';'" "extra ;" { target *-*-* } .-1 }
inline double max(double a, double b) {return a > b ? a : b;}; // { dg-message "note" } candidate
- // { dg-error "extra ';'" "extra ;" { target *-*-* } 19 }
+ // { dg-error "extra ';'" "extra ;" { target *-*-* } .-1 }
int main() {
static void foo(int i, int j, double x, double y) ;// { dg-error "" } .*
{
public:
operator=(B &); // { dg-error "no type" }
- // { dg-message "B::operator=|no known conversion" "note" { target *-*-* } 12 }
+ // { dg-message "B::operator=|no known conversion" "note" { target *-*-* } .-1 }
};
void
};
cookie cat(&foo("apabepa"));// { dg-warning "deprecated conversion|forbids converting a string constant" "dep" }
-// { dg-warning "taking address of temporary" "add" { target *-*-* } 19 }
+// { dg-warning "taking address of temporary" "add" { target *-*-* } .-1 }
void bee () {
int i = 0;
for (int fun() = 0; i != 2; ++i) { // { dg-warning "extern" "extern" }
- // { dg-error "initialized" "init" { target *-*-* } 17 }
+ // { dg-error "initialized" "init" { target *-*-* } .-1 }
}
}
}
int j = i; // { dg-error "" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 6 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
namespace B {
int j = i; // { dg-error "" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 8 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
}
void A::main() {
void (B::*mPtrB)(B*);
(*(void (*)(A*))PMF2PF(mPtrB))(&b); // { dg-error "argument passing" }
- // { dg-warning "convert" "warn" { target *-*-* } 20 }
+ // { dg-warning "convert" "warn" { target *-*-* } .-1 }
}
int main() {
typedef void (*T) (...);
void f ();
struct S { void g (T); void h() { g(f); } };// { dg-error "" "match" }
-// { dg-message "candidate|S::g|no known conversion" "match candidate text" { target *-*-* } 5 }
+// { dg-message "candidate|S::g|no known conversion" "match candidate text" { target *-*-* } .-1 }
void f ();
void g1 (void (*) (...)); void h1 () { g1 (f); }// { dg-error "invalid conversion" }
struct S { void g2 (void (*) (...)); void h2 () { g2 (f); } };// { dg-error "invalid conversion" "match" }
-// { dg-message "candidate|S::g2|no known conversion" "match candidate text" { target *-*-* } 5 }
+// { dg-message "candidate|S::g2|no known conversion" "match candidate text" { target *-*-* } .-1 }
// foo variable first, and therefore do not
// perform argument-dependent lookup.
bar(new X); // { dg-error "3:'bar' was not declared" }
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 17 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
}
-pedantic, even in bad1. */
int (*ok1)() = foo::bar;
void (foo::*bad1)(int) = foo::bar; // { dg-error "assuming pointer" }
-// { dg-message "note" "note" { target *-*-* } 16 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
int (*ok2)() = &foo::bar; // ok
void (*bad2)(int) = foo::bar; // { dg-error "no matches" }
static void iteratorTest(const foo &x)
{
foo::const_iterator i = x.begin(); // { dg-error "incomplete type" "incomplete type" }
- // { dg-error "const foo" "" { target *-*-* } 14 }
+ // { dg-error "const foo" "" { target *-*-* } .-1 }
for (; i; ++i)
*i;
}
// Origin: Jakub Jelinek <jakub@redhat.com>
class X { // { dg-error "1:new types may not be defined in a return type" "new types" }
-// { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'X'\\)" "note" { target *-*-* } 5 }
+// { dg-message "1:\\(perhaps a semicolon is missing after the definition of 'X'\\)" "note" { target *-*-* } .-1 }
public:
X();
virtual ~X();
int A::m; // { dg-error "extra qualification" }
struct e;
struct A::e {int i;}; // { dg-error "extra qualification" "qual" }
- // { dg-error "anonymous struct" "anon" { target *-*-* } 14 }
+ // { dg-error "anonymous struct" "anon" { target *-*-* } .-1 }
struct A::expand { // { dg-error "qualified name" }
int m;
};
class A {
public:
int kaka(tmp::B = b); // { dg-error "" } no b in scope
- // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 18 }
+ // { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-1 }
};
void x()
{
int* p = 1==0; // { dg-warning "converting 'false' to pointer" "" { target { ! c++11 } } }
-// { dg-error "cannot convert" "" { target { c++11 } } 5 }
+// { dg-error "cannot convert" "" { target { c++11 } } .-1 }
}
{
B b;
if ((const char *)b != 0) // { dg-warning "choosing 'B" "B" } surprising overload resolution
- // { dg-warning "for conversion" "conv" { target *-*-* } 19 }
- // { dg-message "note" "note" { target *-*-* } 19 }
+ // { dg-warning "for conversion" "conv" { target *-*-* } .-1 }
+ // { dg-message "note" "note" { target *-*-* } .-2 }
return 1;
if ((const char *)(const B)b == 0)
return 2;
{
int (A::*ptr1) (int) = &A::ns;
int (A::*ptr2) (int) = A::ns; // { dg-error "pointer to member" "err" }
- // { dg-message "pointer to member" "note" { target *-*-* } 23 }
+ // { dg-message "pointer to member" "note" { target *-*-* } .-1 }
int (A::*ptr3) (int) = &ns; // { dg-error "pointer to member" "err" }
int (A::*ptr4) (int) = ns; // { dg-error "pointer to member" "err" }
void f()
{
Vector<T>::iterator i = 0; // { dg-error "typename" "typename" } missing typename
-} // { dg-error "expected" "expected" { target *-*-* } 16 }
+} // { dg-error "expected" "expected" { target *-*-* } .-1 }
const Z &z2 = va_arg (args, Z); // { dg-error "incomplete" }
va_arg (args, char); // { dg-warning "promote" }
- // { dg-message "should pass" "pass" { target *-*-* } 25 }
- // { dg-message "abort" "abort" { target *-*-* } 25 }
+ // { dg-message "should pass" "pass" { target *-*-* } .-1 }
+ // { dg-message "abort" "abort" { target *-*-* } .-2 }
va_arg (args, int []); // { dg-error "array with unspecified bounds" } promote
va_arg (args, int ()); // { dg-warning "promoted" } promote
- // { dg-message "abort" "abort" { target *-*-* } 29 }
+ // { dg-message "abort" "abort" { target *-*-* } .-1 }
va_arg (args, bool); // { dg-warning "promote" "promote" }
- // { dg-message "abort" "abort" { target *-*-* } 31 }
+ // { dg-message "abort" "abort" { target *-*-* } .-1 }
}
class GCD {
public:
enum { val = (N == 0) ? M : GCD<N, M % N>::val };
-// { dg-error "constant expression" "valid" { target *-*-* } 6 }
-// { dg-message "template argument" "valid" { target *-*-* } 6 }
+// { dg-error "constant expression" "valid" { target *-*-* } .-1 }
+// { dg-message "template argument" "valid" { target *-*-* } .-2 }
};
int main() {
int x[n];
asize(x); // { dg-error "" } no matching function
- // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } 13 }
+ // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } .-1 }
}
template <class T>
struct S {
typedef typename T::Y<T>::Z X; // { dg-error "non-template" "non-template" } No Y in A
-// { dg-message "note" "note" { target *-*-* } 6 }
-// { dg-error "does not declare" "not declare" { target *-*-* } 6 }
+// { dg-message "note" "note" { target *-*-* } .-1 }
+// { dg-error "does not declare" "not declare" { target *-*-* } .-2 }
X x; // { dg-error "does not name a type" } No Y in A
};
void g(T);
template void g(int); // { dg-error "no definition available" "no def" }
-// { dg-message "required" "inst" { target *-*-* } 43 }
+// { dg-message "required" "inst" { target *-*-* } .-1 }
f<0>(s0, s2);
f(s0, s2); // { dg-error "" } no matching function
- // { dg-message "(candidate|deduced conflicting|ambiguous base class)" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|deduced conflicting|ambiguous base class)" "candidate note" { target *-*-* } .-1 }
}
void bar()
{
foo(S<3>()); // { dg-error "" } no way to deduce J from this.
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 11 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
}
void h()
{
f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 16 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 }
g(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 18 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 }
}
{
S1 s1;
s1.f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 27 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 }
S2<char> s2;
s2.f(3, 'c'); // { dg-error "" } no matching function
- // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } 31 }
+ // { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 }
}
struct B : public A<U>
{
A_Type Func(); // { dg-error "does not name a type" "err" } implicit typename
- // { dg-message "note" "note" { target *-*-* } 14 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
template <class U>
void C<U>::Func(A_Type) { // { dg-error "declared void" "void" } implicit typename
-// { dg-error "not declared" "decl" { target *-*-* } 25 }
+// { dg-error "not declared" "decl" { target *-*-* } .-1 }
}
struct B : public A<U>
{
A_Type Func(); // { dg-error "does not name a type" "err" }
- // { dg-message "note" "note" { target *-*-* } 13 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
template <class U>
void f ()
{
B* new_entries = (B *) 0; // { dg-error "'B' was not declared in this scope" "B" }
- // { dg-error "'new_entries' was not declared in this scope" "new_entries" { target *-*-* } 18 }
- // { dg-error "expected" "exp" { target *-*-* } 18 }
+ // { dg-error "'new_entries' was not declared in this scope" "new_entries" { target *-*-* } .-1 }
+ // { dg-error "expected" "exp" { target *-*-* } .-2 }
}
};
main ()
{
f (g); // { dg-error "" } ambiguous unification
- // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } 10 }
+ // { dg-message "(candidate|deduce template parameter)" "candidate note" { target *-*-* } .-1 }
return 0;
}
void baz (int **p1)
{
Foo (p1); // { dg-error "match" } no such function
- // { dg-message "(candidate|incompatible cv-qualifiers|conversion)" "candidate note" { target *-*-* } 18 }
+ // { dg-message "(candidate|incompatible cv-qualifiers|conversion)" "candidate note" { target *-*-* } .-1 }
Bar (p1); // OK
}
{
A dummy;
PrintArgs (dummy, dummy); // { dg-message "pass" } cannot pass non-POD
-// { dg-message "required" "inst" { target *-*-* } 25 }
+// { dg-message "required" "inst" { target *-*-* } .-1 }
return 0;
}
bool f()
{
return 3 == MyInt(); // { dg-error "ambiguous" "err" }
- // { dg-message "operator==" "match candidate text" { target *-*-* } 26 }
+ // { dg-message "operator==" "match candidate text" { target *-*-* } .-1 }
}
};
class some_derived::func(derived_func_args &a) // { dg-error "does not name a type" "type" } illegal member syntax
-// { dg-error "expected" "exp" { target *-*-* } 33 }
+// { dg-error "expected" "exp" { target *-*-* } .-1 }
{
std::cout << a.i << ' ' << a.f << std::endl;
}
class Vector
{
friend ostream& operator<< (ostream& out, const Vector<T> & vec); // { dg-warning "non-template" "warn" }
- // { dg-message "note" "note" { target *-*-* } 17 }
+ // { dg-message "note" "note" { target *-*-* } .-1 }
};
template <class T>
struct bar : foo {
typedef int an_int;
bar() : bar::an_int(3) {} // { dg-error "match" "match" } not a base
- // { dg-message "expected" "exp" { target *-*-* } 14 }
+ // { dg-message "expected" "exp" { target *-*-* } .-1 }
};
int
void f()
{
extent(b); // { dg-error "" } no matching function
- // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } 17 }
+ // { dg-message "(candidate|mismatched types)" "candidate note" { target *-*-* } .-1 }
}
void f ()
{
l: int; /* { dg-error "a label can only be part of a statement and a declaration is not a statement" "not stmt" } */
- /* { dg-warning "useless type name in empty declaration" "type name" { target *-*-* } 10 } */
- /* { dg-error "label at end of compound statement" "label" { target *-*-* } 10 } */
+ /* { dg-warning "useless type name in empty declaration" "type name" { target *-*-* } .-1 } */
+ /* { dg-error "label at end of compound statement" "label" { target *-*-* } .-2 } */
}
/* { dg-do compile } */
/* { dg-options "-std=c89 -pedantic" } */
struct { int a[]; } x = { 0 }; /* { dg-warning "ISO C90 does not support flexible array members" } */
-/* { dg-error "flexible array member in a struct with no named members" "" { target *-*-* } 3 } */
+/* { dg-error "flexible array member in a struct with no named members" "" { target *-*-* } .-1 } */
x()
{
foo (i);
- /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 6 } */
- /* { dg-message "function it appears in" "reminder message" { target *-*-* } 6 } */
+ /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } .-1 } */
+ /* { dg-message "function it appears in" "reminder message" { target *-*-* } .-2 } */
}
useit (s); // OK, constant argument to alloca
s = alloca (num); // { dg-warning "large due to conversion" "" { target lp64 } }
- // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 27 }
+ // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } .-1 }
useit (s);
s = alloca (30000); /* { dg-warning "is too large" } */
if (n > 0 && n < 3000)
{
p = __builtin_alloca (n); // { dg-warning "'alloca' may be too large" "" { target lp64} }
- // { dg-message "note:.*argument may be as large as 2999" "note" { target lp64 } 39 }
- // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 39 }
+ // { dg-message "note:.*argument may be as large as 2999" "note" { target lp64 } .-1 }
+ // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } .-2 }
}
else
p = __builtin_malloc (n);
uc = 'A';
uc = x ? 1U : -1; /* { dg-warning " conversion" "conversion" } */
- /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } 43 } */
+ /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } .-1 } */
uc = x ? SCHAR_MIN : 1U; /* { dg-warning " conversion" "conversion" } */
- /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } 45 } */
+ /* { dg-warning "negative integer implicitly converted to unsigned type" "implicit" { target *-*-* } .-1 } */
uc = x ? 1 : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
uc = x ? SCHAR_MIN : 1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
ui = x ? 1U : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
enum e3
{
F = sizeof (struct t3), /* { dg-bogus "invalid in C\[+\]\[+\]" } */
- /* { dg-error "invalid application of 'sizeof'" "" { target *-*-* } 27 } */
+ /* { dg-error "invalid application of 'sizeof'" "" { target *-*-* } .-1 } */
G = __alignof__ (struct t4), /* { dg-bogus "invalid in C\[+\]\[+\]" } */
- /* { dg-error "invalid application of '__alignof__'" "" { target *-*-* } 29 } */
+ /* { dg-error "invalid application of '__alignof__'" "" { target *-*-* } .-1 } */
H
};
__typeof__ (struct s5 { int i; }) v5; /* { dg-warning "invalid in C\[+\]\[+\]" } */
__typeof__ (struct t5) w5; /* { dg-bogus "invalid in C\[+\]\[+\]" } */
- /* { dg-error "storage size of 'w5' isn't known" "" { target *-*-* } 35 } */
+ /* { dg-error "storage size of 'w5' isn't known" "" { target *-*-* } .-1 } */
int
f1 (struct s1 *p)
static l; /* { dg-warning "type defaults to" } */
foo (a) /* { dg-warning "return type defaults to" } */
-/* { dg-warning "type of .a. defaults to .int." "type" { target *-*-* } 6 } */
+/* { dg-warning "type of .a. defaults to .int." "type" { target *-*-* } .-1 } */
{
auto p; /* { dg-warning "type defaults to" } */
typedef bar; /* { dg-warning "type defaults to" } */
static l; /* { dg-error "type defaults to" } */
foo (a) /* { dg-error "return type defaults to" } */
-/* { dg-error "type of .a. defaults to .int." "type" { target *-*-* } 6 } */
+/* { dg-error "type of .a. defaults to .int." "type" { target *-*-* } .-1 } */
{
auto p; /* { dg-error "type defaults to" } */
typedef bar; /* { dg-error "type defaults to" } */
static l; /* { dg-warning "type defaults to" } */
foo (a) /* { dg-warning "return type defaults to" } */
-/* { dg-warning "type of .a. defaults to .int." "type" { target *-*-* } 6 } */
+/* { dg-warning "type of .a. defaults to .int." "type" { target *-*-* } .-1 } */
{
auto p; /* { dg-warning "type defaults to" } */
typedef bar; /* { dg-warning "type defaults to" } */
/* { dg-options "-Wall" } */
-void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } 5 } */
+void foo(unsigned long* ulp); /* { dg-message "note: expected '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" { target *-*-* } . } */
void bar(long* lp) {
/* { dg-options "-pedantic" } */
-void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 5 } */
+void foo(unsigned long* ulp);/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } . } */
void bar(long* lp) {
foo(lp); /* { dg-warning "differ in signedness" } */
void foo1 (int d) /* { dg-message "note: previous definition" } */
{
double d; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "redeclared as different" "" { target *-*-* } 15 } */
+ /* { dg-error "redeclared as different" "" { target *-*-* } .-1 } */
}
void foo2 (int d) /* { dg-message "shadowed declaration" } */
int f10(v) { return 0; } /* { dg-warning "declaration of 'v' shadows a global declaration" } */
int f11(int a, int b(int a));
int f12(int a, int b(int a, int x[a])); /* { dg-warning "declaration of 'a' shadows a parameter" } */
-/* { dg-message "shadowed declaration" "outer parm" { target *-*-* } 20 } */
+/* { dg-message "shadowed declaration" "outer parm" { target *-*-* } .-1 } */
default: break;
}
switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
}
switch (ej) /* { dg-error "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-error "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 25 } */
+ { /* { dg-error "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
default: break;
}
switch (ek) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
default: break;
}
switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
}
switch (ej) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 25 } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
default: break;
}
switch (ek) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
default: break;
}
switch (ei) /* { dg-error "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-error "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ { /* { dg-error "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
}
switch (ej) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 25 } */
+ { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
default: break;
}
switch (ek) /* { dg-error "enumeration value 'e2' not handled in switch" "enum e2" } */
default: break;
}
switch (ei) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
- { /*{ dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } 22 } */
+ { /*{ dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
}
switch (ej)
{
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return;
if (255 >= (unsigned char) 1)
return;
}
void b (unsigned short x)
-{ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } 25 } */
+{ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } 27 } */
+ /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } 29 } */
+ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } 31 } */
+ /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
}
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 64 } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return 1;
else
return 0;
return;
if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */
return;
- if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */
+ if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return;
if (255 >= (unsigned char) 1)
return;
}
void b (unsigned short x)
-{ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } 25 } */
+{ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } 27 } */
+ /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } 29 } */
+ /* { dg-warning "comparison of unsigned expression < 0 is always false" "" { target { ! int32plus } } .+1 } */
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { int32plus } } } */
- /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } 31 } */
+ /* { dg-warning "comparison of unsigned expression >= 0 is always true" "" { target { ! int32plus } } .+1 } */
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { int32plus } } } */
}
int test (int x)
{
- if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 64 } */
+ if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } . } */
return 1;
else
return 0;
{
// 11 * 4 bytes = 44: Not OK.
uint32_t x[a]; // { dg-warning "array may be too large" }
- // { dg-message "note:.*argument may be as large as 44" "note" { target *-*-* } 26 }
+ // { dg-message "note:.*argument may be as large as 44" "note" { target *-*-* } .-1 }
f0 (x);
}
}
/* { dg-options "-std=c99 -pedantic-errors" } */
struct Foo { int; }; /* { dg-bogus "unnamed" } */
-/* { dg-error "declaration does not declare anything" "int;" { target *-*-* } 5 } */
-/* { dg-error "struct has no members" "no members" { target *-*-* } 5 } */
+/* { dg-error "declaration does not declare anything" "int;" { target *-*-* } .-1 } */
+/* { dg-error "struct has no members" "no members" { target *-*-* } .-2 } */
typeof (int [(__UINTPTR_TYPE__)&a]) c5; /* { dg-error "37:at file scope" } */
int d0[1/0]; /* { dg-error "5:at file scope" } */
-/* { dg-warning "9:division by zero" "" { target *-*-* } 23 } */
+/* { dg-warning "9:division by zero" "" { target *-*-* } .-1 } */
int (*d1)[1/0]; /* { dg-error "7:at file scope" } */
-/* { dg-warning "12:division by zero" "" { target *-*-* } 25 } */
+/* { dg-warning "12:division by zero" "" { target *-*-* } .-1 } */
int (*d2())[1/0]; /* { dg-error "7:at file scope" } */
-/* { dg-warning "14:division by zero" "" { target *-*-* } 27 } */
+/* { dg-warning "14:division by zero" "" { target *-*-* } .-1 } */
struct d3 { int x[1/0]; }; /* { dg-error "17:at file scope" } */
-/* { dg-warning "20:division by zero" "" { target *-*-* } 29 } */
+/* { dg-warning "20:division by zero" "" { target *-*-* } .-1 } */
struct d4 { int (*x)[1/0]; }; /* { dg-error "19:at file scope" } */
-/* { dg-warning "23:division by zero" "" { target *-*-* } 31 } */
+/* { dg-warning "23:division by zero" "" { target *-*-* } .-1 } */
typeof (int [1/0]) d5; /* { dg-error "20:at file scope" } */
struct g { struct f f; };
struct g g1 = { { 0, { } } };
struct g g2 = { { 0, { 1 } } }; /* { dg-error "nested context" "nested" } */
- /* { dg-message "near init" "near" { target *-*-* } 11 } */
+ /* { dg-message "near init" "near" { target *-*-* } .-1 } */
struct h { int x[0]; int y; };
struct h h1 = { { 0 }, 1 }; /* { dg-warning "excess elements" "excess" } */
- /* { dg-message "near init" "before end" { target *-*-* } 14 } */
+ /* { dg-message "near init" "before end" { target *-*-* } .-1 } */
struct S
{
int a[1][][2]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } 7 } */
+ /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
};
struct R
{
int i;
int a[][]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } 14 } */
+ /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
};
typedef int T[];
typedef int U[][]; /* { dg-error "array type has incomplete element type" } */
-/* { dg-message "declaration of .U. as multidimensional array must have bounds" "" { target *-*-* } 19 } */
+/* { dg-message "declaration of .U. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
int x[][]; /* { dg-error "array type has incomplete element type" } */
-/* { dg-message "declaration of .x. as multidimensional array must have bounds" "" { target *-*-* } 22 } */
+/* { dg-message "declaration of .x. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
struct N;
void
fn1 (int z[][]) /* { dg-error "array type has incomplete element type" } */
-/* { dg-message "declaration of .z. as multidimensional array must have bounds" "" { target *-*-* } 28 } */
+/* { dg-message "declaration of .z. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
{
int a[1][][2]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } 31 } */
+ /* { dg-message "declaration of .a. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
/* OK */
int b[3][2][1];
int c[1][2][3][]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .c. as multidimensional array must have bounds" "" { target *-*-* } 35 } */
+ /* { dg-message "declaration of .c. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
T d[1]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .d. as multidimensional array must have bounds" "" { target *-*-* } 37 } */
+ /* { dg-message "declaration of .d. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
T e[]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-message "declaration of .e. as multidimensional array must have bounds" "" { target *-*-* } 39 } */
+ /* { dg-message "declaration of .e. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
/* This array has incomplete element type, but is not multidimensional. */
struct N f[1]; /* { dg-error "array type has incomplete element type" } */
- /* { dg-bogus "declaration of .f. as multidimensional array must have bounds" "" { target *-*-* } 43 } */
+ /* { dg-bogus "declaration of .f. as multidimensional array must have bounds" "" { target *-*-* } .-1 } */
}
void fn2 (int [][]); /* { dg-error "array type has incomplete element type" } */
-/* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } 47 } */
+/* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } .-1 } */
/* OK */
void fn3 (int [][*]);
void fn4 (T []); /* { dg-error "array type has incomplete element type" } */
-/* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } 51 } */
+/* { dg-message "declaration of multidimensional array must have bounds" "" { target *-*-* } .-1 } */
struct g { struct f f; };
struct g g1 = { { 0, { } } };
struct g g2 = { { 0, { 1 } } }; /* { dg-error "nested context" "nested" } */
- /* { dg-message "near init" "near" { target *-*-* } 10 } */
+ /* { dg-message "near init" "near" { target *-*-* } .-1 } */
struct h { int x[0]; int y; };
struct h h1 = { { 0 }, 1 }; /* { dg-warning "excess elements" "excess" } */
- /* { dg-message "near init" "before end" { target *-*-* } 13 } */
+ /* { dg-message "near init" "before end" { target *-*-* } .-1 } */
pv[0]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
0[pv]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
sip[0]; /* { dg-error "invalid use of undefined type 'struct si'" } */
- /* { dg-error "dereferencing pointer to incomplete type" "incomplete" { target *-*-* } 45 } */
+ /* { dg-error "dereferencing pointer to incomplete type" "incomplete" { target *-*-* } .-1 } */
0[sip]; /* { dg-error "invalid use of undefined type 'struct si'" } */
}
extern int i;
int a[] = { [1 ? 1 : i] = 0 }; /* { dg-warning "array index in initializer is not an integer constant expression" } */
-/* { dg-message "near initialization" "near init" { target *-*-* } 8 } */
+/* { dg-message "near initialization" "near init" { target *-*-* } .-1 } */
extern int i;
int a[] = { [1 ? 1 : i] = 0 }; /* { dg-error "array index in initializer is not an integer constant expression" } */
-/* { dg-message "near initialization" "near init" { target *-*-* } 8 } */
+/* { dg-message "near initialization" "near init" { target *-*-* } .-1 } */
unsigned long g: 5; /* { dg-warning "GCC extension|ISO C" } */
ui h: 5;
enum foo i: 2; /* { dg-warning "narrower" } */
- /* { dg-warning "GCC extension|ISO C" "extension" { target *-*-* } 27 } */
+ /* { dg-warning "GCC extension|ISO C" "extension" { target *-*-* } .-1 } */
enum foo j: 3; /* { dg-warning "GCC extension|ISO C" } */
unsigned int k: 256; /* { dg-error "exceeds its type" } */
};
/* { dg-options "" } */
struct { int i : 1999; } x; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "width" "bit-field too wide" { target *-*-* } 6 } */
+/* { dg-error "width" "bit-field too wide" { target *-*-* } .-1 } */
#if defined(__DATE__)
#error "__DATE__ is defined, but should not be (-U command line error)"
-/* { dg-bogus "__DATE__ is defined" "" { target *-*-* } 9 } */
+/* { dg-bogus "__DATE__ is defined" "" { target *-*-* } .-1 } */
#endif
#if __TIME__ != X
#error "__TIME__ is not defined as expected (-D command line error)"
-/* { dg-bogus "__TIME__ is not defined" "" { target *-*-* } 14 } */
+/* { dg-bogus "__TIME__ is not defined" "" { target *-*-* } .-1 } */
#endif
#if !defined(__TIMESTAMP__)
#error "__TIMESTAMP__ is not defined (built-in macro expectation error)"
-/* { dg-bogus "__TIMESTAMP__ is not defined" "" { target *-*-* } 19 } */
+/* { dg-bogus "__TIMESTAMP__ is not defined" "" { target *-*-* } .-1 } */
#endif
#if !defined(__FILE__) || !defined(__BASE_FILE__)
#error "Expected built-in is not defined (built-in macro expectation error)"
-/* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } 59 } */
+/* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } .-1 } */
#endif
#define __FILE__ "X" /* Define while already defined. */
#if !defined(__LINE__) || !defined(__INCLUDE_LEVEL__) || !defined(__COUNTER__)
#error "Expected built-in is not defined (built-in macro expectation error)"
-/* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } 70 } */
+/* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } .-1 } */
#endif
#define __LINE__ 0 /* { dg-warning "\"__LINE__\" redef" } */
f4 (void)
{
return 1; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 20 } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
}
_Noreturn void
f5 (void)
{
return; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 27 } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
}
_Noreturn void
f4 (void)
{
return 1; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 25 } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
}
noreturn void
f5 (void)
{
return; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 32 } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } .-1 } */
}
noreturn void
/* { dg-options "-std=c11 -pedantic-errors" } */
_Static_assert (__INT_MAX__ * 2, "overflow"); /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "error" { target *-*-* } 5 } */
+/* { dg-error "overflow in constant expression" "error" { target *-*-* } .-1 } */
_Static_assert ((void *)(__SIZE_TYPE__)16, "non-integer"); /* { dg-error "not an integer" } */
is a C99 feature. */
void bar0 (int a[const]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "\[quals\] not in C90" { target *-*-* } 18 } */
+/* { dg-error "ISO C90" "\[quals\] not in C90" { target *-*-* } .-1 } */
void bar1 (int a[const 2]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "\[quals expr\] not in C90" { target *-*-* } 20 } */
+/* { dg-error "ISO C90" "\[quals expr\] not in C90" { target *-*-* } .-1 } */
void bar2 (int a[static 2]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "\[static expr\] not in C90" { target *-*-* } 22 } */
+/* { dg-error "ISO C90" "\[static expr\] not in C90" { target *-*-* } .-1 } */
void bar3 (int a[static const 2]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "\[static quals expr\] not in C90" { target *-*-* } 24 } */
+/* { dg-error "ISO C90" "\[static quals expr\] not in C90" { target *-*-* } .-1 } */
void bar4 (int a[const static 2]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "\[quals static expr\] not in C90" { target *-*-* } 26 } */
+/* { dg-error "ISO C90" "\[quals static expr\] not in C90" { target *-*-* } .-1 } */
/* Because [*] isn't properly implemented and so warns, we don't test here
for [const *] yet. */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
_Complex double foo; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "C" "_Complex not in C90" { target *-*-* } 6 } */
+/* { dg-error "C" "_Complex not in C90" { target *-*-* } .-1 } */
foo (void)
{
(int) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "compound literal" "scalar" { target *-*-* } 12 } */
+ /* { dg-error "compound literal" "scalar" { target *-*-* } .-1 } */
(struct s) { 1, 2 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "compound literal" "struct" { target *-*-* } 14 } */
+ /* { dg-error "compound literal" "struct" { target *-*-* } .-1 } */
(union u) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "compound literal" "union" { target *-*-* } 16 } */
+ /* { dg-error "compound literal" "union" { target *-*-* } .-1 } */
(int [1]) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "compound literal" "array" { target *-*-* } 18 } */
+ /* { dg-error "compound literal" "array" { target *-*-* } .-1 } */
}
struct s a = { atan (1.0) }; /* { dg-error "is not a constant expression|near initialization" } */
/* Overflow. */
struct t b = { INT_MAX + 1 }; /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
struct t c = { DBL_MAX }; /* { dg-warning "overflow in implicit constant conversion" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 23 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* Bad operator outside sizeof. */
struct s d = { 1 ? 1.0 : atan (a.d) }; /* { dg-error "is not a constant expression|near initialization" } */
}
#include <float.h>
int a = DBL_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 9 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
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 *-*-* } 12 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
unsigned int d = (unsigned)-1.0; /* { dg-error "overflow" } */
int e = 0 << 1000; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 16 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int f = 0 << -1; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 18 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int g = 0 >> 1000; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 20 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int h = 0 >> -1; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 22 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int b1 = (0 ? (int) DBL_MAX : 0);
unsigned int d1 = (0 ? (unsigned int)-1.0 : 0);
int i = -1 << 0;
int j[1] = { DBL_MAX }; /* { dg-warning "overflow in implicit constant conversion" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 34 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
enum e {
E0 = 0 * (INT_MAX + 1), /* { dg-warning "21:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 12 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E1 = 0 * (INT_MIN / -1), /* { dg-warning "21:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 14 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E2 = 0 * (INT_MAX * INT_MAX), /* { dg-warning "21:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 16 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E3 = 0 * (INT_MIN - 1), /* { dg-warning "21:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 18 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E4 = 0 * (unsigned)(INT_MIN - 1), /* { dg-warning "31:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 20 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E5 = 0 * -INT_MIN, /* { dg-warning "12:integer overflow in expression" } */
- /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 22 } */
+ /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } .-1 } */
E6 = 0 * !-INT_MIN, /* { dg-warning "13:integer overflow in expression" } */
- /* { dg-error "8:not an integer constant" "constant" { target *-*-* } 24 } */
+ /* { dg-error "8:not an integer constant" "constant" { target *-*-* } .-1 } */
E7 = INT_MIN % -1 /* { dg-warning "16:integer overflow in expression" } */
- /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } 28 } */
+ /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } .+1 } */
};
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
enum foo { bar, }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "comma at end" "enum comma error" { target *-*-* } 6 } */
+/* { dg-error "comma at end" "enum comma error" { target *-*-* } .-1 } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
struct flex { int a; int b[]; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "ISO C90" "flexible array members not in C90" { target *-*-* } 6 } */
+/* { dg-error "ISO C90" "flexible array members not in C90" { target *-*-* } .-1 } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
double d = 0x1.2p2; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "hexadecimal floating" "hex float error" { target *-*-* } 6 } */
+/* { dg-error "hexadecimal floating" "hex float error" { target *-*-* } .-1 } */
double d1 = 0x1p2; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "hexadecimal floating" "hex float error" { target *-*-* } 8 } */
+/* { dg-error "hexadecimal floating" "hex float error" { target *-*-* } .-1 } */
double d2 = 0x1...p2; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "too many decimal points" "bad hex float" { target *-*-* } 10 } */
+/* { dg-error "too many decimal points" "bad hex float" { target *-*-* } .-1 } */
typedef const int cint;
const cint foo; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } 7 } */
+/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } .-1 } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
const const int foo; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } 6 } */
+/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } .-1 } */
typedef const int cia[2];
const cia a; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } 8 } */
+/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } .-1 } */
const cia b[2]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } 10 } */
+/* { dg-error "duplicate" "duplicate type qualifier error" { target *-*-* } .-1 } */
int i;
i = 0;
int j; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "mix|parse" "mixed declarations and code not in C90" { target *-*-* } 11 } */
+ /* { dg-error "mix|parse" "mixed declarations and code not in C90" { target *-*-* } .-1 } */
}
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
char *restrict foo; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parse error|syntax error|expected|no type" "restrict not in C90" { target *-*-* } 6 } */
+/* { dg-error "parse error|syntax error|expected|no type" "restrict not in C90" { target *-*-* } .-1 } */
bar (void)
{
return 1; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "with a value" "return constraint violation" { target *-*-* } 15 } */
+ /* { dg-error "with a value" "return constraint violation" { target *-*-* } .-1 } */
}
struct s;
extern int a[][]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "\[\]\[\] var" { target *-*-* } 11 } */
+/* { dg-error "array" "\[\]\[\] var" { target *-*-* } .-1 } */
void f (int [][]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "\[\]\[\] arg" { target *-*-* } 14 } */
+/* { dg-error "array" "\[\]\[\] arg" { target *-*-* } .-1 } */
extern struct s b[]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "struct \[\] var" { target *-*-* } 17 } */
+/* { dg-error "array" "struct \[\] var" { target *-*-* } .-1 } */
void g (struct s []); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "struct \[\] arg" { target *-*-* } 20 } */
+/* { dg-error "array" "struct \[\] arg" { target *-*-* } .-1 } */
extern func c[]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "func \[\] var" { target *-*-* } 23 } */
+/* { dg-error "array" "func \[\] var" { target *-*-* } .-1 } */
void h (func []); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "array" "func \[\] arg" { target *-*-* } 26 } */
+/* { dg-error "array" "func \[\] arg" { target *-*-* } .-1 } */
f02 (int a[const])
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 17 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
void
int a[const];
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 25 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
f12 (int a[const 2])
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 36 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
void
int a[const 2];
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 44 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
f32 (int a[static const 2])
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 72 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
void
int a[static const 2];
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 80 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
f42 (int a[const static 2])
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 91 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
void
int a[const static 2];
{
int **b = &a; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "discards" "discards quals" { target *-*-* } 99 } */
+ /* { dg-error "discards" "discards quals" { target *-*-* } .-1 } */
int *const *c = &a;
}
/* Test rejection of static and type qualifiers in non-parameter contexts. */
int x[const 2]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "non-parameter" "quals in non-parm array" { target *-*-* } 105 } */
+/* { dg-error "non-parameter" "quals in non-parm array" { target *-*-* } .-1 } */
int y[static 2]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "non-parameter" "static in non-parm array" { target *-*-* } 107 } */
+/* { dg-error "non-parameter" "static in non-parm array" { target *-*-* } .-1 } */
void g (int a[static 2][3]);
void h (int a[2][static 3]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "non-parameter" "static in non-final parm array" { target *-*-* } 110 } */
+/* { dg-error "non-parameter" "static in non-final parm array" { target *-*-* } .-1 } */
/* Plain `_Complex' for complex double is a GNU extension. */
_Complex g; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "plain" "plain _Complex" { target *-*-* } 16 } */
+/* { dg-error "plain" "plain _Complex" { target *-*-* } .-1 } */
/* Complex integer types are GNU extensions. */
_Complex int h; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "complex integer" "_Complex int" { target *-*-* } 20 } */
+/* { dg-error "complex integer" "_Complex int" { target *-*-* } .-1 } */
_Complex long i; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "complex integer" "_Complex long" { target *-*-* } 22 } */
+/* { dg-error "complex integer" "_Complex long" { target *-*-* } .-1 } */
/* Use of ~ for complex conjugation is a GNU extension, but a constraint
violation (6.5.3.3p1) in C99.
foo (_Complex double z)
{
return ~z; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "complex conj" "~ for conjugation" { target *-*-* } 31 } */
+ /* { dg-error "complex conj" "~ for conjugation" { target *-*-* } .-1 } */
}
foo (_Complex double z)
{
z++; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "complex" "postinc" { target *-*-* } 13 } */
+ /* { dg-error "complex" "postinc" { target *-*-* } .-1 } */
++z; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "complex" "preinc" { target *-*-* } 15 } */
+ /* { dg-error "complex" "preinc" { target *-*-* } .-1 } */
z--; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "complex" "postdec" { target *-*-* } 17 } */
+ /* { dg-error "complex" "postdec" { target *-*-* } .-1 } */
--z; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "complex" "predec" { target *-*-* } 19 } */
+ /* { dg-error "complex" "predec" { target *-*-* } .-1 } */
return z;
}
/* The type name must not be incomplete (apart from arrays of unknown
size), or a function type, or a VLA type. */
(void) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "void type" { target *-*-* } 17 } */
+ /* { dg-error "init" "void type" { target *-*-* } .-1 } */
&(struct si) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "incomplete struct type" { target *-*-* } 19 } */
- /* { dg-error "invalid use of undefined type" "" { target *-*-* } 19 } */
+ /* { dg-error "init" "incomplete struct type" { target *-*-* } .-1 } */
+ /* { dg-error "invalid use of undefined type" "" { target *-*-* } .-2 } */
&(union ui) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "incomplete union type" { target *-*-* } 22 } */
- /* { dg-error "invalid use of undefined type" "" { target *-*-* } 22 } */
+ /* { dg-error "init" "incomplete union type" { target *-*-* } .-1 } */
+ /* { dg-error "invalid use of undefined type" "" { target *-*-* } .-2 } */
(void (void)) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "function type" { target *-*-* } 25 } */
+ /* { dg-error "init" "function type" { target *-*-* } .-1 } */
(int [a]) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init|variable" "VLA type" { target *-*-* } 27 } */
+ /* { dg-error "init|variable" "VLA type" { target *-*-* } .-1 } */
/* Initializers must not attempt to initialize outside the object
declared. */
(int [1]) { [1] = 2 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "value outside array" { target *-*-* } 31 } */
+ /* { dg-error "init" "value outside array" { target *-*-* } .-1 } */
(int [1]) { [-1] = 2 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "value outside array" { target *-*-* } 33 } */
+ /* { dg-error "init" "value outside array" { target *-*-* } .-1 } */
(int [1]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "value outside array" { target *-*-* } 35 } */
+ /* { dg-error "init" "value outside array" { target *-*-* } .-1 } */
}
int z;
/* Outside a function, initializers must be constant. */
struct s *s0 = &(struct s) { 0, z }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "non-const" { target *-*-* } 42 } */
+/* { dg-error "init" "non-const" { target *-*-* } .-1 } */
int sz = sizeof((struct s) { 0, z }); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "non-const" { target *-*-* } 44 } */
+/* { dg-error "init" "non-const" { target *-*-* } .-1 } */
/* Compound literals aren't themselves constant expressions. */
int x = (int) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "non-const" { target *-*-* } 48 } */
+/* { dg-error "init" "non-const" { target *-*-* } .-1 } */
/* Nor are they suitable structure or union initializers
outside a function. */
struct s s1 = (struct s) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "struct bad init" { target *-*-* } 53 } */
+/* { dg-error "init" "struct bad init" { target *-*-* } .-1 } */
union u u1 = (union u) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "union bad init" { target *-*-* } 55 } */
+/* { dg-error "init" "union bad init" { target *-*-* } .-1 } */
/* They aren't suitable for array initializers, either inside or outside
a function. */
int y[2] = (int [2]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "array bad init" { target *-*-* } 60 } */
+/* { dg-error "init" "array bad init" { target *-*-* } .-1 } */
void
bar (void)
struct s s2 = (struct s) { 0, 1 };
union u u2 = (union u) { 0 };
int z[2] = (int [2]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "array bad init" { target *-*-* } 68 } */
+ /* { dg-error "init" "array bad init" { target *-*-* } .-1 } */
}
#include <limits.h>
int a = DBL_MAX; /* { dg-warning "overflow in implicit constant conversion" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 10 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
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 *-*-* } 13 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
unsigned int d = (unsigned)-1.0; /* { dg-error "overflow" } */
int e = 0 << 1000; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 17 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int f = 0 << -1; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 19 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int g = 0 >> 1000; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 21 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int h = 0 >> -1; /* { dg-warning "shift count" } */
-/* { dg-error "constant" "constant" { target *-*-* } 23 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int b1 = (0 ? (int) DBL_MAX : 0);
unsigned int d1 = (0 ? (unsigned int)-1.0 : 0);
int h1 = (0 ? 0 >> -1: 0);
int i = -1 << 0;
-/* { dg-error "constant" "constant" { target *-*-* } 33 } */
+/* { dg-error "constant" "constant" { target *-*-* } .-1 } */
int j[1] = { DBL_MAX }; /* { dg-warning "overflow in implicit constant conversion" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 36 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
int array[2] = { [0 * (INT_MAX + 1)] = 0 }; /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 39 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
_Bool k = INT_MAX + 1; /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 42 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
enum e {
E0 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 12 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E1 = 0 * (INT_MIN / -1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 14 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E2 = 0 * (INT_MAX * INT_MAX), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 16 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E3 = 0 * (INT_MIN - 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 18 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E4 = 0 * (unsigned)(INT_MIN - 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 20 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E5 = 0 * -INT_MIN, /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 22 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
E6 = 0 * !-INT_MIN, /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "not an integer constant" "constant" { target *-*-* } 24 } */
+ /* { dg-error "not an integer constant" "constant" { target *-*-* } .-1 } */
E7 = INT_MIN % -1 /* { dg-warning "16:integer overflow in expression" } */
- /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } 28 } */
+ /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } .+1 } */
};
elements of arrays (6.7.2.1#2). */
struct t0 { struct flex a; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "struct in struct" { target *-*-* } 16 } */
+/* { dg-error "invalid use of structure" "struct in struct" { target *-*-* } .-1 } */
struct t1 { union rf1 a; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in struct" { target *-*-* } 18 } */
+/* { dg-error "invalid use of structure" "union in struct" { target *-*-* } .-1 } */
struct t2 { union rf2 a; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in struct" { target *-*-* } 20 } */
+/* { dg-error "invalid use of structure" "union in struct" { target *-*-* } .-1 } */
struct t3 { union rf3 a; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in struct" { target *-*-* } 22 } */
+/* { dg-error "invalid use of structure" "recursive union in struct" { target *-*-* } .-1 } */
struct t4 { union rf4 a; }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in struct" { target *-*-* } 24 } */
+/* { dg-error "invalid use of structure" "recursive union in struct" { target *-*-* } .-1 } */
void f0 (struct flex[]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "struct in array" { target *-*-* } 27 } */
+/* { dg-error "invalid use of structure" "struct in array" { target *-*-* } .-1 } */
void f1 (union rf1[]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in array" { target *-*-* } 29 } */
+/* { dg-error "invalid use of structure" "union in array" { target *-*-* } .-1 } */
void f2 (union rf2[]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in array" { target *-*-* } 31 } */
+/* { dg-error "invalid use of structure" "union in array" { target *-*-* } .-1 } */
void f3 (union rf3[]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } 33 } */
+/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } .-1 } */
void f4 (union rf4[]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } 35 } */
+/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } .-1 } */
struct flex a0[1]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "struct in array" { target *-*-* } 38 } */
+/* { dg-error "invalid use of structure" "struct in array" { target *-*-* } .-1 } */
union rf1 a1[1]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in array" { target *-*-* } 40 } */
+/* { dg-error "invalid use of structure" "union in array" { target *-*-* } .-1 } */
union rf2 a2[1]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "union in array" { target *-*-* } 42 } */
+/* { dg-error "invalid use of structure" "union in array" { target *-*-* } .-1 } */
union rf3 a3[1]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } 44 } */
+/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } .-1 } */
union rf4 a4[1]; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } 46 } */
+/* { dg-error "invalid use of structure" "recursive union in array" { target *-*-* } .-1 } */
struct s { int a; char b[]; };
struct s a = { 0, "" }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 8 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s b = { 0, { 0 } }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 10 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s c = { 0, { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
struct s d = { .b = "" }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 13 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s e = { .b = { 0 } }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 15 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s f = { .b = { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
struct s { int a; T b; };
struct s a = { 0, "" }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 9 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s b = { 0, { 0 } }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 11 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s c = { 0, { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
struct s d = { .b = "" }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 14 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s e = { .b = { 0 } }; /* { dg-error "initialization of a flexible array member" } */
-/* { dg-message "near init" "near init" { target *-*-* } 16 } */
+/* { dg-message "near init" "near init" { target *-*-* } .-1 } */
struct s f = { .b = { } }; /* { dg-error "ISO C forbids empty initializer braces" } */
foo (void)
{
bar (); /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "implicit" "C99 implicit declaration error" { target *-*-* } 9 } */
+ /* { dg-error "implicit" "C99 implicit declaration error" { target *-*-* } .-1 } */
}
/* C90 subclause 7.1.7 says we can implicitly declare strcmp; C99 removes
bar (const char *a, const char *b)
{
return strcmp (a, b); /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "implicit" "C99 implicit declaration error" { target *-*-* } 19 } */
+ /* { dg-error "implicit" "C99 implicit declaration error" { target *-*-* } .-1 } */
}
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
extern foo; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "type defaults" "C99 implicit int error" { target *-*-* } 6 } */
+/* { dg-error "type defaults" "C99 implicit int error" { target *-*-* } .-1 } */
bar (void) { } /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "return type defaults" "C99 implicit int error" { target *-*-* } 8 } */
+/* { dg-error "return type defaults" "C99 implicit int error" { target *-*-* } .-1 } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
void foo (a) { } /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "defaults" "C99 implicit int parameter error" { target *-*-* } 8 } */
+/* { dg-error "defaults" "C99 implicit int parameter error" { target *-*-* } .-1 } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
int a[] = { [(void *)0] = 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } 7 } */
+/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } .-1 } */
/* The following are constraint violations and should be rejected. */
int restrict bar; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 10 } */
+/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } .-1 } */
typedef void (*fp) (void);
fp restrict baz; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 15 } */
+/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } .-1 } */
void quux (int restrict a[3]); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 18 } */
+/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } .-1 } */
foo (void)
{
return; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "with no value" "return constraint violation" { target *-*-* } 9 } */
+ /* { dg-error "with no value" "return constraint violation" { target *-*-* } .-1 } */
}
void
bar (void)
{
return 1; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "with a value" "return constraint violation" { target *-*-* } 16 } */
+ /* { dg-error "with a value" "return constraint violation" { target *-*-* } .-1 } */
}
union u0;
union u1 *x1;
enum e0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "forward" "enum forward 1" { target *-*-* } 16 } */
+ /* { dg-error "forward" "enum forward 1" { target *-*-* } .-1 } */
enum e1 *x2; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "forward" "enum forward 2" { target *-*-* } 18 } */
+ /* { dg-error "forward" "enum forward 2" { target *-*-* } .-1 } */
/* GCC used to fail to diagnose a use of an enum inside its definition. */
enum e2 { E2A = sizeof (enum e2 *) }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "forward" "enum forward 3" { target *-*-* } 21 } */
+ /* { dg-error "forward" "enum forward 3" { target *-*-* } .-1 } */
}
/* A specific type shall have its content defined at most once. But we
may redeclare the tag in different scopes. */
union s0 { long l; };
}
struct s0 { int i; }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "rede" "struct redef" { target *-*-* } 34 } */
+ /* { dg-error "rede" "struct redef" { target *-*-* } .-1 } */
union u0 { int i; }; /* { dg-message "note: originally defined here" } */
{
union u0 { long l; };
struct u0 { long l; };
}
union u0 { int i; }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "rede" "union redef" { target *-*-* } 43 } */
+ /* { dg-error "rede" "union redef" { target *-*-* } .-1 } */
enum e0 { E0A }; /* { dg-message "note: originally defined here" } */
{
enum e0 { E0B };
struct e0 { long l; };
}
enum e0 { E0B }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "rede" "enum redef" { target *-*-* } 52 } */
+ /* { dg-error "rede" "enum redef" { target *-*-* } .-1 } */
}
/* Structure, union and enumerated types have a single namespace of tags. */
{
enum e1 { E1A };
/* None of the following are allowed; some were not detected by GCC. */
union s0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 70 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
union s1 { int i; }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 72 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
union s2; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 74 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
union s3 { int i; }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 76 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
enum u0 { U0A }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 78 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
enum u2 { U2A }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 80 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
struct e0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 82 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
struct e1 { int i; }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 84 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
}
/* Explicit shadowing in inner scopes is OK, but references to the tag
that don't explicitly shadow it must (whether in declarations or
}
{
union s0 *x0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 114 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
int x1[sizeof (union s1 *)]; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 116 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
struct t;
union s2 *x2;
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 119 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
int x3[sizeof (union s3 *)]; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 121 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
struct u;
enum u0 *y0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong|forward" "wrong tag type" { target *-*-* } 124 } */
+ /* { dg-error "wrong|forward" "wrong tag type" { target *-*-* } .-1 } */
int y1[sizeof (enum u2 *)]; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong|forward" "wrong tag type" { target *-*-* } 126 } */
+ /* { dg-error "wrong|forward" "wrong tag type" { target *-*-* } .-1 } */
struct v;
struct e0 *z0; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 129 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
int z1[sizeof (struct e1 *)]; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 131 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
struct w;
}
/* When explicitly shadowed to be a tag of a different type, references
union s0 *x0;
union s1;
struct s1 *x1; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 142 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
union s2;
union s2 *x2;
union s3;
struct s3 *x3; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "wrong" "wrong tag type" { target *-*-* } 147 } */
+ /* { dg-error "wrong" "wrong tag type" { target *-*-* } .-1 } */
}
}
}
union u3 { float v; };
void h(void) { const struct u3; } /* { dg-error "29:'u3' defined as wrong kind of tag" } */
-/* { dg-error "29:empty declaration with type qualifier does not redeclare tag" "wrong tag empty" { target *-*-* } 42 } */
+/* { dg-error "29:empty declaration with type qualifier does not redeclare tag" "wrong tag empty" { target *-*-* } .-1 } */
/* However, such useless specifiers are OK if the contents of the tag
are being defined, or shadowed in an inner scope with the contents
void g1 (void) { f_cv (); } /* { dg-error "qualified void" } */
void g2 (void) { f_s (); } /* { dg-error "invalid use of undefined type" } */
void g3 (void) { ((const void (*) (void)) f_v) (); } /* { dg-error "qualified void" } */
-/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 12 } */
+/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } .-1 } */
void g4 (void) { ((struct s (*) (void)) f_v) (), (void) 0; } /* { dg-error "invalid use of undefined type" } */
-/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 14 } */
+/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } .-1 } */
/* PR 4713 */
/* dg.exp doesn't read the header files for magic comments. */
-/* { dg-error "unterminated comment" "" { target *-*-* } 4 } */
+/* { dg-error "unterminated comment" "" { target *-*-* } .-1 } */
/* { dg-error "unterminated comment" "header error" { target *-*-* } 8 } */
#include "19940712-1.h"
/* { dg-do preprocess } */
-/* { dg-error "include expects" "include" { target *-*-* } 4 } */
-/* { dg-error "newline at end" "newline" { target *-*-* } 4 } */
+/* { dg-error "include expects" "include" { target *-*-* } .+2 } */
+/* { dg-error "newline at end" "newline" { target *-*-* } .+1 } */
#include /\
{
FOO(i
= 4)
- else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } 12 } */
+ else; /* { dg-error "'else' without a previous 'if'" "error on this line" { target *-*-* } . } */
}
#define HASHINCLUDE #include
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
-/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
+/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } .-1 }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } .-2 }*/
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
-/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 19 }*/
+/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } .-1 }*/
int resync_parser_2;
void g1 ()
#define starslash *##/
slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
-/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 47 } */
+/* { dg-error "does not give" "paste warning(s)" { target *-*-* } .-1 } */
#define HASHINCLUDE #include
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
-/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
+/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } .-1 }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } .-2 }*/
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 18 }*/
#define foo - ## >>
foo;
-/* { dg-error "expected identifier.*'-'" "expected" { target *-*-* } 8 } */
-/* { dg-error pasting "pasting" { target *-*-* } 8 } */
+/* { dg-error "expected identifier.*'-'" "expected" { target *-*-* } .-1 } */
+/* { dg-error pasting "pasting" { target *-*-* } .-2 } */
foo (void)
{
// 1st
- /* { dg-error "C\\+\\+ style comments are not allowed in ISO C90" "comments" { target *-*-*} 8 } */
- /* { dg-error "reported only once" "" { target *-*-*} 8 } */
+ /* { dg-error "C\\+\\+ style comments are not allowed in ISO C90" "comments" { target *-*-*} .-1 } */
+ /* { dg-error "reported only once" "" { target *-*-*} .-2 } */
// 2nd
// 3rd
}
foo (void)
{
// 1st
- /* { dg-error "C\\+\\+ style comments are not allowed in ISO C90" "comments" { target *-*-*} 8 } */
- /* { dg-error "reported only once" "" { target *-*-*} 8 } */
+ /* { dg-error "C\\+\\+ style comments are not allowed in ISO C90" "comments" { target *-*-*} .-1 } */
+ /* { dg-error "reported only once" "" { target *-*-*} .-2 } */
// 2nd
// 3rd
}
#pragma unknown
{
error;
- /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 9 } */
- /* { dg-message "function it appears in" "reminder message" { target *-*-* } 9 } */
+ /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } .-1 } */
+ /* { dg-message "function it appears in" "reminder message" { target *-*-* } .-2 } */
}
}
#pragma unknown
{}
error;
- /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } 13 } */
- /* { dg-message "function it appears in" "reminder message" { target *-*-* } 13 } */
+ /* { dg-error "undeclared" "undeclared-variable message" { target *-*-* } .-1 } */
+ /* { dg-message "function it appears in" "reminder message" { target *-*-* } .-2 } */
}
/* { dg-do preprocess } */
-/* { dg-warning "backslash-new" "escaped EOF warning" { target *-*-* } 6 } */
+/* { dg-warning "backslash-new" "escaped EOF warning" { target *-*-* } .+1 } */
\
recognized. */
/* { dg-do preprocess } */
-/* { dg-warning "missing terminating" "bad charconst" { target *-*-* } 7 } */
-/* { dg-error "not valid" "bad charconst" { target *-*-* } 7 } */
+/* { dg-warning "missing terminating" "bad charconst" { target *-*-* } .+2 } */
+/* { dg-error "not valid" "bad charconst" { target *-*-* } .+1 } */
#if 'x
#endif
/* /* */ // { dg-error "\"\.\*\" within comment .-Werror=comment." }
// \
- // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } 6 }
+ // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } .-1 }
/* /* */ // { dg-error "\"\.\*\" within comment .-Werror=comment." }
// \
- // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } 6 }
+ // { dg-error "multi-line comment .-Werror=comment." "multi-line" { target *-*-* } .-1 }
/* /* */ // { dg-warning "4: \"\.\*\" within comment .-Wcomment." }
// \
- // { dg-warning "1: multi-line comment .-Wcomment." "multi-line" { target *-*-* } 6 }
+ // { dg-warning "1: multi-line comment .-Wcomment." "multi-line" { target *-*-* } .-1 }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Werror=long-long" }
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
#if 0LL // { dg-error "traditional C rejects the \"LL\" suffix .-Werror=long-long." }
- // { dg-error "use of C99 long long integer constant .-Werror=long-long." "use long long" { target *-*-* } 4 }
+ // { dg-error "use of C99 long long integer constant .-Werror=long-long." "use long long" { target *-*-* } .-1 }
#endif
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wtraditional -Wlong-long" }
#if 0LL // { dg-warning "traditional C rejects the \"LL\" suffix .-Wlong-long." }
- // { dg-warning "use of C99 long long integer constant .-Wlong-long." "use long long" { target *-*-* } 4 }
+ // { dg-warning "use of C99 long long integer constant .-Wlong-long." "use long long" { target *-*-* } .-1 }
#endif
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
#ifndef __TIME__
#error "__TIME__ builtin is not defined"
-// { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } 5 }
+// { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 }
#endif
#define __TIME__ "X" // { dg-error "\"__TIME__\" redefined .-Werror=builtin-macro-redefined." }
#define __TIME__ "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
- // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } 11 }
+ // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
// { dg-message "previous definition" "previous-1" { target *-*-* } 9 }
#define X "X"
#define X "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
- // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } 16 }
+ // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
// { dg-message "previous definition" "previous-2" { target *-*-* } 15 }
#ifndef __TIME__
#error "__TIME__ builtin is not defined"
-// { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } 5 }
+// { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 }
#endif
#define __TIME__ "X" // { dg-warning "\"__TIME__\" redefined .-Wbuiltin-macro-redefined." }
#define __TIME__ "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
- // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } 11 }
+ // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
// { dg-message "previous definition" "previous-1" { target *-*-* } 9 }
#define X "X"
#define X "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
- // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } 16 }
+ // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
// { dg-message "previous definition" "previous-2" { target *-*-* } 15 }
typedef const struct __CFString *CFStringRef;
const CFStringRef S = ((CFStringRef)__builtin___CFStringMakeConstantString("Testing"));
-/* { dg-error "built-in" "built-in function .* requires .* flag" { target *-*-* } 11 } */
+/* { dg-error "built-in" "built-in function .* requires .* flag" { target *-*-* } .-1 } */
CFStringRef notchk = CFSTR ("here is an unchecked %d %s string");
s1 (notchk, 5, 6, 7);
printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format .%s. expects argument of type .char .., but argument 3 has type .int." } */
- /* { dg-warning "too many arguments for format" "" { target *-*-* } 33 } */
+ /* { dg-warning "too many arguments for format" "" { target *-*-* } .-1 } */
printf(s5 (1, "and so is this %d %d %s", 3, 4, "hey", 6), 5, 6, 12);/* { dg-warning "format .%s. expects argument of type .char .., but argument 4 has type .int." } */
}
{
b: a: ; /* { dg-bogus "a label can only be part of a statement" } */
c: d e; /* { dg-error "a label can only be part of a statement" } */
-/* { dg-error "unknown type name 'd'" "unknown type name" { target *-*-* } 23 } */
+/* { dg-error "unknown type name 'd'" "unknown type name" { target *-*-* } .-1 } */
;
}
/* These should all be diagnosed, but only once, not for every
identifier declared. */
struct s0 int x0, /* { dg-error "two or more data types" } */
-/* { dg-error "storage size of 'x0' isn't known" "" { target *-*-* } 11 } */
+/* { dg-error "storage size of 'x0' isn't known" "" { target *-*-* } .-1 } */
x1; /* { dg-error "storage size of 'x1' isn't known" } */
char union u0 x2, /* { dg-error "two or more data types" } */
x3;
enum e0 struct s1 x4, /* { dg-error "two or more data types" } */
- /* { dg-error "storage size of 'x4' isn't known" "" { target *-*-* } 18 } */
+ /* { dg-error "storage size of 'x4' isn't known" "" { target *-*-* } .-1 } */
x5; /* { dg-error "storage size of 'x5' isn't known" } */
short short x6, /* { dg-error "duplicate" } */
register int y; /* { dg-warning "file-scope declaration of 'y' specifies 'register'" } */
void h (void) { extern void x (void) {} } /* { dg-error "nested function 'x' declared 'extern'" } */
-/* { dg-warning "ISO C forbids nested functions" "nested" { target *-*-* } 21 } */
+/* { dg-warning "ISO C forbids nested functions" "nested" { target *-*-* } .-1 } */
void
g (void)
static const void r1; /* { dg-error "variable or field 'r1' declared void" } */
register void f8 (void); /* { dg-error "invalid storage class for function 'f8'" } */
-/* { dg-warning "file-scope declaration of 'f8' specifies 'register'" "register function" { target *-*-* } 39 } */
+/* { dg-warning "file-scope declaration of 'f8' specifies 'register'" "register function" { target *-*-* } .-1 } */
void i (void) { auto void y (void) {} } /* { dg-warning "ISO C forbids nested functions" } */
-/* { dg-warning "function definition declared 'auto'" "nested" { target *-*-* } 42 } */
+/* { dg-warning "function definition declared 'auto'" "nested" { target *-*-* } .-1 } */
inline int main (void) { return 0; } /* { dg-warning "cannot inline function 'main'" } */
register int y; /* { dg-error "file-scope declaration of 'y' specifies 'register'" } */
void h (void) { extern void x (void) {} } /* { dg-error "nested function 'x' declared 'extern'" } */
-/* { dg-error "ISO C forbids nested functions" "nested" { target *-*-* } 21 } */
+/* { dg-error "ISO C forbids nested functions" "nested" { target *-*-* } .-1 } */
void
g (void)
static const void r1; /* { dg-error "variable or field 'r1' declared void" } */
register void f8 (void); /* { dg-error "invalid storage class for function 'f8'" } */
-/* { dg-error "file-scope declaration of 'f8' specifies 'register'" "register function" { target *-*-* } 39 } */
+/* { dg-error "file-scope declaration of 'f8' specifies 'register'" "register function" { target *-*-* } .-1 } */
void i (void) { auto void y (void) {} } /* { dg-error "ISO C forbids nested functions" } */
-/* { dg-error "function definition declared 'auto'" "nested" { target *-*-* } 42 } */
+/* { dg-error "function definition declared 'auto'" "nested" { target *-*-* } .-1 } */
inline int main (void) { return 0; } /* { dg-error "cannot inline function 'main'" } */
specifiers diagnosed, not just the general problem that they are
empty declarations. */
long short; /* { dg-error "both 'long' and 'short' in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 20 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
_Complex double; /* { dg-warning "ISO C90 does not support complex types" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 22 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
_Complex; /* { dg-warning "ISO C90 does not support complex types" } */
-/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } 24 } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 24 } */
+/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } .-1 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-2 } */
_Complex int; /* { dg-warning "ISO C90 does not support complex types" } */
-/* { dg-warning "ISO C does not support complex integer types" "ISO C" { target *-*-* } 27 } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 27 } */
+/* { dg-warning "ISO C does not support complex integer types" "ISO C" { target *-*-* } .-1 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-2 } */
/* Specific messages for each invalid combination. (That some message
is given when appropriate for a larger collection of combinations
short long x4; /* { dg-error "both 'long' and 'short' in declaration specifiers" } */
void long x5; /* { dg-error "both 'long' and 'void' in declaration specifiers" } */
_Bool long x6; /* { dg-error "both 'long' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 38 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
char long x7; /* { dg-error "both 'long' and 'char' in declaration specifiers" } */
float long x8; /* { dg-error "both 'long' and 'float' in declaration specifiers" } */
long short x9; /* { dg-error "both 'long' and 'short' in declaration specifiers" } */
void short x10; /* { dg-error "both 'short' and 'void' in declaration specifiers" } */
_Bool short x11; /* { dg-error "both 'short' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 44 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
char short x12; /* { dg-error "both 'short' and 'char' in declaration specifiers" } */
float short x13; /* { dg-error "both 'short' and 'float' in declaration specifiers" } */
double short x14; /* { dg-error "both 'short' and 'double' in declaration specifiers" } */
unsigned signed x15; /* { dg-error "both 'signed' and 'unsigned' in declaration specifiers" } */
void signed x16; /* { dg-error "both 'signed' and 'void' in declaration specifiers" } */
_Bool signed x17; /* { dg-error "both 'signed' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 51 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
float signed x18; /* { dg-error "both 'signed' and 'float' in declaration specifiers" } */
double signed x19; /* { dg-error "both 'signed' and 'double' in declaration specifiers" } */
signed unsigned x20; /* { dg-error "both 'signed' and 'unsigned' in declaration specifiers" } */
void unsigned x21; /* { dg-error "both 'unsigned' and 'void' in declaration specifiers" } */
_Bool unsigned x22; /* { dg-error "both 'unsigned' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 57 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
float unsigned x23; /* { dg-error "both 'unsigned' and 'float' in declaration specifiers" } */
double unsigned x24; /* { dg-error "both 'unsigned' and 'double' in declaration specifiers" } */
void _Complex x25; /* { dg-error "both 'complex' and 'void' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } 61 } */
+/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } .-1 } */
_Bool _Complex x26; /* { dg-error "both 'complex' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } 63 } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 63 } */
+/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } .-1 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-2 } */
long void x27; /* { dg-error "both 'long' and 'void' in declaration specifiers" } */
short void x28; /* { dg-error "both 'short' and 'void' in declaration specifiers" } */
signed void x29; /* { dg-error "both 'signed' and 'void' in declaration specifiers" } */
unsigned void x30; /* { dg-error "both 'unsigned' and 'void' in declaration specifiers" } */
_Complex void x31; /* { dg-error "both 'complex' and 'void' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } 71 } */
-/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "complex" { target *-*-* } 71 } */
+/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } .-1 } */
+/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "complex" { target *-*-* } .-2 } */
long _Bool x32; /* { dg-error "both 'long' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 74 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
short _Bool x33; /* { dg-error "both 'short' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 76 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
signed _Bool x34; /* { dg-error "both 'signed' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 78 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
unsigned _Bool x35; /* { dg-error "both 'unsigned' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 80 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-1 } */
_Complex _Bool x36; /* { dg-error "both 'complex' and '_Bool' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } 82 } */
-/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } 82 } */
-/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "complex" { target *-*-* } 82 } */
+/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } .-1 } */
+/* { dg-warning "ISO C90 does not support boolean types" "C90" { target *-*-* } .-2 } */
+/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "complex" { target *-*-* } .-3 } */
long char x37; /* { dg-error "both 'long' and 'char' in declaration specifiers" } */
short char x38; /* { dg-error "both 'short' and 'char' in declaration specifiers" } */
long float x39; /* { dg-error "both 'long' and 'float' in declaration specifiers" } */
signed float x41; /* { dg-error "both 'signed' and 'float' in declaration specifiers" } */
unsigned float x42; /* { dg-error "both 'unsigned' and 'float' in declaration specifiers" } */
long long double x43; /* { dg-error "both 'long long' and 'double' in declaration specifiers" } */
-/* { dg-warning "ISO C90 does not support 'long long'" "C90" { target *-*-* } 92 } */
+/* { dg-warning "ISO C90 does not support 'long long'" "C90" { target *-*-* } .-1 } */
short double x44; /* { dg-error "both 'short' and 'double' in declaration specifiers" } */
signed double x45; /* { dg-error "both 'signed' and 'double' in declaration specifiers" } */
unsigned double x46; /* { dg-error "both 'unsigned' and 'double' in declaration specifiers" } */
int z; /* { dg-message "previous declaration of 'z'" } */
typedef t2 *z; /* { dg-error "unknown type name 't2'" } */
-/* { dg-error "'z' redeclared " "redeclared" { target *-*-* } 7 } */
+/* { dg-error "'z' redeclared " "redeclared" { target *-*-* } .-1 } */
extern t3 p1(void); /* { dg-error "unknown type name 't3'" } */
int p2(const t4 x); /* { dg-error "unknown type name 't4'" } */
const char *f1()
{
return (const t17) "abc"; /* { dg-error "unknown type name 't17'" "t17" } */
-/* { dg-bogus "expected" "expected" { target *-*-* } 63 } */
+/* { dg-bogus "expected" "expected" { target *-*-* } .-1 } */
}
const char *f2()
{
return (const t18 *) "abc"; /* { dg-error "unknown type name 't18'" "t18" } */
-/* { dg-bogus "expected" "expected" { target *-*-* } 69 } */
+/* { dg-bogus "expected" "expected" { target *-*-* } .-1 } */
}
void *f3(int x)
{
return (void *) ((void *(*)(t19)) f3); /* { dg-error "unknown type name 't19'" "t19" } */
-/* { dg-bogus "expected" "expected" { xfail *-*-* } 79 } */
+/* { dg-bogus "expected" "expected" { xfail *-*-* } .-1 } */
}
const void *f4()
{
return &((const t20){1}); /* { dg-error "unknown type name 't20'" } */
-/* { dg-bogus "return discards 'const'" "discards" { target *-*-* } 85 } */
-/* { dg-bogus "expected" "expected" { target *-*-* } 85 } */
+/* { dg-bogus "return discards 'const'" "discards" { target *-*-* } .-1 } */
+/* { dg-bogus "expected" "expected" { target *-*-* } .-2 } */
}
int f5(__builtin_va_list ap)
int f6(void)
{
return __builtin_offsetof (t23, field); /* { dg-error "unknown type name 't23'" "t23" } */
-/* { dg-bogus "request for member" "request" { target *-*-* } 98 } */
+/* { dg-bogus "request for member" "request" { target *-*-* } .-1 } */
}
long; /* { dg-warning "useless type name in empty declaration" } */
T; /* { dg-warning "useless type name in empty declaration" } */
static const; /* { dg-warning "useless storage class specifier in empty declaration" } */
-/* { dg-warning "empty declaration" "static const" { target *-*-* } 24 } */
+/* { dg-warning "empty declaration" "static const" { target *-*-* } .-1 } */
union { long b; }; /* { dg-warning "unnamed struct/union that defines no instances" } */
/* Multiple type names (errors). */
struct s1 int; /* { dg-error "two or more data types in declaration specifiers" } */
char union u1; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "char union" { target *-*-* } 30 } */
+/* { dg-warning "useless type name in empty declaration" "char union" { target *-*-* } .-1 } */
double enum { E2 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "double enum" { target *-*-* } 32 } */
+/* { dg-warning "useless type name in empty declaration" "double enum" { target *-*-* } .-1 } */
T struct s2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "T struct" { target *-*-* } 34 } */
+/* { dg-warning "useless type name in empty declaration" "T struct" { target *-*-* } .-1 } */
long union u2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 36 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
struct s3 short; /* { dg-error "two or more data types in declaration specifiers" } */
union u3 signed; /* { dg-error "two or more data types in declaration specifiers" } */
unsigned struct s4; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 40 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
_Complex enum { E3 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 42 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
long; /* { dg-warning "useless type name in empty declaration" } */
T; /* { dg-warning "useless type name in empty declaration" } */
static const; /* { dg-warning "useless storage class specifier in empty declaration" } */
-/* { dg-warning "empty declaration" "static const" { target *-*-* } 24 } */
+/* { dg-warning "empty declaration" "static const" { target *-*-* } .-1 } */
union { long b; }; /* { dg-warning "unnamed struct/union that defines no instances" } */
/* Multiple type names (errors). */
struct s1 int; /* { dg-error "two or more data types in declaration specifiers" } */
char union u1; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "char union" { target *-*-* } 30 } */
+/* { dg-warning "useless type name in empty declaration" "char union" { target *-*-* } .-1 } */
double enum { E2 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "double enum" { target *-*-* } 32 } */
+/* { dg-warning "useless type name in empty declaration" "double enum" { target *-*-* } .-1 } */
T struct s2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "T struct" { target *-*-* } 34 } */
+/* { dg-warning "useless type name in empty declaration" "T struct" { target *-*-* } .-1 } */
long union u2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 36 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
struct s3 short; /* { dg-error "two or more data types in declaration specifiers" } */
union u3 signed; /* { dg-error "two or more data types in declaration specifiers" } */
unsigned struct s4; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 40 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
_Complex enum { E3 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } 42 } */
-/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } 42 } */
-/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } 42 } */
+/* { dg-warning "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
+/* { dg-warning "ISO C90 does not support complex types" "C90" { target *-*-* } .-2 } */
+/* { dg-warning "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } .-3 } */
long; /* { dg-error "useless type name in empty declaration" } */
T; /* { dg-error "useless type name in empty declaration" } */
static const; /* { dg-warning "useless storage class specifier in empty declaration" } */
-/* { dg-error "empty declaration" "static const" { target *-*-* } 24 } */
+/* { dg-error "empty declaration" "static const" { target *-*-* } .-1 } */
union { long b; }; /* { dg-error "unnamed struct/union that defines no instances" } */
/* Multiple type names (errors). */
struct s1 int; /* { dg-error "two or more data types in declaration specifiers" } */
char union u1; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "char union" { target *-*-* } 30 } */
+/* { dg-error "useless type name in empty declaration" "char union" { target *-*-* } .-1 } */
double enum { E2 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "double enum" { target *-*-* } 32 } */
+/* { dg-error "useless type name in empty declaration" "double enum" { target *-*-* } .-1 } */
T struct s2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "T struct" { target *-*-* } 34 } */
+/* { dg-error "useless type name in empty declaration" "T struct" { target *-*-* } .-1 } */
long union u2; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } 36 } */
+/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
struct s3 short; /* { dg-error "two or more data types in declaration specifiers" } */
union u3 signed; /* { dg-error "two or more data types in declaration specifiers" } */
unsigned struct s4; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } 40 } */
+/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
_Complex enum { E3 }; /* { dg-error "two or more data types in declaration specifiers" } */
-/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } 42 } */
-/* { dg-error "ISO C90 does not support complex types" "C90" { target *-*-* } 42 } */
-/* { dg-error "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } 42 } */
+/* { dg-error "useless type name in empty declaration" "empty" { target *-*-* } .-1 } */
+/* { dg-error "ISO C90 does not support complex types" "C90" { target *-*-* } .-2 } */
+/* { dg-error "ISO C does not support plain 'complex' meaning 'double complex'" "ISO C" { target *-*-* } .-3 } */
6.9#2). */
static static struct s; /* { dg-error "duplicate 'static'" } */
-/* { dg-warning "useless storage class specifier in empty declaration" "static static" { target *-*-* } 15 } */
+/* { dg-warning "useless storage class specifier in empty declaration" "static static" { target *-*-* } .-1 } */
static extern struct t; /* { dg-error "multiple storage classes in declaration specifiers" } */
-/* { dg-warning "useless storage class specifier in empty declaration" "static extern" { target *-*-* } 18 } */
+/* { dg-warning "useless storage class specifier in empty declaration" "static extern" { target *-*-* } .-1 } */
inline union u; /* { dg-error "'inline' in empty declaration" } */
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" "" } */
- /* { dg-warning "'y' is deprecated: Bad y" "y" { target *-*-* } 54 } */
- /* { dg-warning "'g2' is deprecated: Please avoid g2" "g2" { target *-*-* } 54 } */
- /* { dg-warning "'g3' is deprecated: Please avoid g3" "g3" { target *-*-* } 54 } */
+ /* { 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" "" } */
}
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" "" } */
- /* { dg-warning "'field8' is deprecated: Please avoid field8" "field8" { target *-*-* } 72 } */
+ /* { dg-warning "'field8' is deprecated: Please avoid field8" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
- /* { dg-warning "'y' is deprecated" "y" { target *-*-* } 55 } */
- /* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } 55 } */
- /* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } 55 } */
+ /* { dg-warning "'y' is deprecated" "y" { target *-*-* } .-1 } */
+ /* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } .-2 } */
+ /* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } .-3 } */
return f1(); /* { dg-warning "'f1' is deprecated" "f1" } */
}
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" "" } */
- /* { dg-warning "'field8' is deprecated" "field8" { target *-*-* } 73 } */
+ /* { dg-warning "'field8' is deprecated" "field8" { target *-*-* } .-1 } */
}
struct SS1 {
} while(0)
DECIMAL_COMPOSITE_DECL(32); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 36 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } .-1 } */
DECIMAL_COMPOSITE_DECL(64); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 40 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } .-1 } */
DECIMAL_COMPOSITE_DECL(128); /* { dg-error "incompatible types when assigning to type '\[^\n\]*' from type '\[^\n\]*'" } */
-/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } 44 } */
+/* { dg-message "note: expected '\[^'\n\]*' but argument is of type '\[^'\n\]*'" "note: expected" { target *-*-* } .-1 } */
int main()
/* { dg-do compile } */
/* { dg-options "-pedantic" } */
-/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } 6 } */
+/* { dg-warning "ISO C forbids an empty translation unit" "empty" { target *-*-* } . } */
/* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */
-/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } 7 } */
+/* { dg-error "ISO C forbids an empty translation unit" "empty" { target *-*-* } . } */
foo (const char *s, int *p)
{
scanf("%ld", p); /* { dg-warning "12:format" "implicit scanf" } */
- /* { dg-warning "implicit" "implicit decl warning" { target *-*-* } 20 } */
+ /* { dg-warning "implicit" "implicit decl warning" { target *-*-* } .-1 } */
}
printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%ld foo" : "%d foos"), nfoo); /* { dg-warning "53:long int" "wrong type" } */
/* Extra arguments to NULL should be complained about. */
printf (0, "foo"); /* { dg-warning "14:too many" "NULL extra args" } */
- /* { dg-warning "null" "null format arg" { target *-*-* } 26 } */
+ /* { dg-warning "null" "null format arg" { target *-*-* } .-1 } */
}
construct should be warned about.
*/
printf ("%.-5d\n", i); /* { dg-warning "14:format|precision" "negative precision warning" } */
- /* { dg-warning "too many arguments for format" "too many arguments" { target *-*-* } 44 } */
+ /* { dg-warning "too many arguments for format" "too many arguments" { target *-*-* } .-1 } */
printf ("%.-*d\n", i); /* { dg-warning "14:format" "broken %.-*d format" } */
- /* { dg-warning "too many arguments for format" "too many arguments" { target *-*-* } 46 } */
+ /* { dg-warning "too many arguments for format" "too many arguments" { target *-*-* } .-1 } */
printf ("%.3c\n", i); /* { dg-warning "15:precision" "precision with %c" } */
printf ("%.3p\n", p); /* { dg-warning "15:precision" "precision with %p" } */
printf ("%.3n\n", n); /* { dg-warning "15:precision" "precision with %n" } */
*/
printf ("%%");
printf ("%.3%"); /* { dg-warning "14:type" "missing type" } */
- /* { dg-warning "15:trailing" "bogus %%" { target *-*-* } 56 } */
+ /* { dg-warning "15:trailing" "bogus %%" { target *-*-* } .-1 } */
printf ("%-%"); /* { dg-warning "13:type" "missing type" } */
- /* { dg-warning "14:trailing" "bogus %%" { target *-*-* } 58 } */
+ /* { dg-warning "14:trailing" "bogus %%" { target *-*-* } .-1 } */
printf ("%-%\n"); /* { dg-warning "13:format" "bogus %%" } */
- /* { dg-warning "15:format" "bogus %%" { target *-*-* } 60 } */
+ /* { dg-warning "15:format" "bogus %%" { target *-*-* } .-1 } */
printf ("%5%\n"); /* { dg-warning "13:format" "bogus %%" } */
- /* { dg-warning "15:format" "bogus %%" { target *-*-* } 62 } */
+ /* { dg-warning "15:format" "bogus %%" { target *-*-* } .-1 } */
printf ("%h%\n"); /* { dg-warning "13:format" "bogus %%" } */
- /* { dg-warning "15:format" "bogus %%" { target *-*-* } 64 } */
+ /* { dg-warning "15:format" "bogus %%" { target *-*-* } .-1 } */
/* Valid and invalid %h, %l, %L constructions. */
printf ("%hd", i);
printf ("%hi", i);
{
strftime (s, m, "%C", tp); /* { dg-warning "C" "%C not in C90" } */
strftime (s, m, "%D", tp); /* { dg-warning "C" "%D not in C90" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 13 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%e", tp); /* { dg-warning "C" "%e not in C90" } */
strftime (s, m, "%F", tp); /* { dg-warning "C" "%F not in C90" } */
strftime (s, m, "%g", tp); /* { dg-warning "C" "%g not in C90" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 17 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%G", tp); /* { dg-warning "C" "%G not in C90" } */
strftime (s, m, "%h", tp); /* { dg-warning "C" "%h not in C90" } */
strftime (s, m, "%n", tp); /* { dg-warning "C" "%n not in C90" } */
strftime (s, m, "%EB", tp); /* { dg-warning "flag|modifier" "bad %EB" } */
strftime (s, m, "%Ed", tp); /* { dg-warning "flag|modifier" "bad %Ed" } */
strftime (s, m, "%ED", tp); /* { dg-warning "flag|modifier" "bad %ED" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 41 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%Ee", tp); /* { dg-warning "flag|modifier" "bad %Ee" } */
strftime (s, m, "%EF", tp); /* { dg-warning "flag|modifier" "bad %EF" } */
strftime (s, m, "%Eg", tp); /* { dg-warning "flag|modifier" "bad %Eg" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 45 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%EG", tp); /* { dg-warning "flag|modifier" "bad %EG" } */
strftime (s, m, "%Eh", tp); /* { dg-warning "flag|modifier" "bad %Eh" } */
strftime (s, m, "%EH", tp); /* { dg-warning "flag|modifier" "bad %EH" } */
strftime (s, m, "%Ob", tp); /* { dg-warning "flag|modifier" "bad %Ob" } */
strftime (s, m, "%OB", tp); /* { dg-warning "flag|modifier" "bad %OB" } */
strftime (s, m, "%Oc", tp); /* { dg-warning "flag|modifier" "bad %Oc" } */
- /* { dg-warning "in some locales" "2-digit year" { target *-*-* } 73 } */
+ /* { dg-warning "in some locales" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%OC", tp); /* { dg-warning "flag|modifier|C" "bad %OC" } */
strftime (s, m, "%OD", tp); /* { dg-warning "flag|modifier" "bad %OD" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 76 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%OF", tp); /* { dg-warning "flag|modifier" "bad %OF" } */
strftime (s, m, "%Og", tp); /* { dg-warning "flag|modifier|C" "bad %Og" } */
- /* { dg-warning "only last 2" "2-digit year" { target *-*-* } 79 } */
+ /* { dg-warning "only last 2" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%OG", tp); /* { dg-warning "flag|modifier|C" "bad %OG" } */
strftime (s, m, "%Oh", tp); /* { dg-warning "flag|modifier" "bad %Oh" } */
strftime (s, m, "%Oj", tp); /* { dg-warning "flag|modifier|C" "bad %Oj" } */
strftime (s, m, "%Ot", tp); /* { dg-warning "flag|modifier" "bad %Ot" } */
strftime (s, m, "%OT", tp); /* { dg-warning "flag|modifier" "bad %OT" } */
strftime (s, m, "%Ox", tp); /* { dg-warning "flag|modifier" "bad %Ox" } */
- /* { dg-warning "in some locales" "2-digit year" { target *-*-* } 90 } */
+ /* { dg-warning "in some locales" "2-digit year" { target *-*-* } .-1 } */
strftime (s, m, "%OX", tp); /* { dg-warning "flag|modifier" "bad %OX" } */
strftime (s, m, "%OY", tp); /* { dg-warning "flag|modifier|C" "bad %OY" } */
strftime (s, m, "%Oz", tp); /* { dg-warning "flag|modifier|C" "bad %Oz" } */
cmn_err_func (0, "%i", i); /* { dg-warning "unknown|too many" } */
cmn_err_func (0, "%d", l); /* { dg-warning "expects argument" } */
cmn_err_func (0, "%b"); /* { dg-warning "'int'" } */
-/* { dg-warning "'char \\*'" "" { target *-*-solaris2.* } 32 } */
+/* { dg-warning "'char \\*'" "" { target *-*-solaris2.* } .-1 } */
cmn_err_func (0, "%b", i); /* { dg-warning "matching" } */
cmn_err_func (0, "%b", i, i); /* { dg-warning "expects argument" } */
cmn_err_func (0, "%b", string, i); /* { dg-warning "expects argument" } */
int f(int *ip, char *cp)
{
__builtin_printf ("%*.*s");
-/* { dg-warning "field width specifier '\\*' expects a matching 'int' argument" "width" { target *-*-* } 6 } */
-/* { dg-warning "field precision specifier '\\.\\*' expects a matching 'int' argument" "precision" { target *-*-* } 6 } */
-/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } 6 } */
+/* { dg-warning "field width specifier '\\*' expects a matching 'int' argument" "width" { target *-*-* } .-1 } */
+/* { dg-warning "field precision specifier '\\.\\*' expects a matching 'int' argument" "precision" { target *-*-* } .-2 } */
+/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } .-3 } */
__builtin_printf ("%*.*s", ip, *cp);
-/* { dg-warning "field width specifier '\\*' expects argument of type 'int'" "width" { target *-*-* } 10 } */
-/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } 10 } */
+/* { dg-warning "field width specifier '\\*' expects argument of type 'int'" "width" { target *-*-* } .-1 } */
+/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "format" { target *-*-* } .-2 } */
__builtin_printf ("%s %i", ip, ip);
-/* { dg-warning "format '%s' expects argument of type 'char \\*'" "char" { target *-*-* } 13 } */
-/* { dg-warning "format '%i' expects argument of type 'int'" "int" { target *-*-* } 13 } */
+/* { dg-warning "format '%s' expects argument of type 'char \\*'" "char" { target *-*-* } .-1 } */
+/* { dg-warning "format '%i' expects argument of type 'int'" "int" { target *-*-* } .-2 } */
__builtin_printf ("%s %i", cp);
-/* { dg-warning "format '%i' expects a matching 'int' argument" "" { target *-*-* } 16 } */
+/* { dg-warning "format '%i' expects a matching 'int' argument" "" { target *-*-* } .-1 } */
__builtin_printf ("%lc");
-/* { dg-warning "format '%lc' expects a matching 'wint_t' argument" "" { target *-*-* } 18 } */
+/* { dg-warning "format '%lc' expects a matching 'wint_t' argument" "" { target *-*-* } .-1 } */
__builtin_printf ("%lc", cp);
-/* { dg-warning "format '%lc' expects argument of type 'wint_t'" "" { target *-*-* } 20 } */
+/* { dg-warning "format '%lc' expects argument of type 'wint_t'" "" { target *-*-* } .-1 } */
__builtin_scanf ("%s");
-/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "" { target *-*-* } 22 } */
+/* { dg-warning "format '%s' expects a matching 'char \\*' argument" "" { target *-*-* } .-1 } */
__builtin_scanf ("%i", cp);
-/* { dg-warning "format '%i' expects argument of type 'int \\*'" "" { target *-*-* } 24 } */
+/* { dg-warning "format '%i' expects argument of type 'int \\*'" "" { target *-*-* } .-1 } */
__builtin_scanf ("%lc");
-/* { dg-warning "format '%lc' expects a matching 'wchar_t \\*' argument" "" { target *-*-* } 26 } */
+/* { dg-warning "format '%lc' expects a matching 'wchar_t \\*' argument" "" { target *-*-* } .-1 } */
__builtin_scanf ("%lc", cp);
-/* { dg-warning "format '%lc' expects argument of type 'wchar_t \\*'" "" { target *-*-* } 28 } */
+/* { dg-warning "format '%lc' expects argument of type 'wchar_t \\*'" "" { target *-*-* } .-1 } */
}
printf ((nfoo > 1) ? "%d foos" : ((nfoo > 0) ? "%ld foo" : "%d foos"), nfoo); /* { dg-warning "long int" "wrong type" } */
/* Extra arguments to NULL should be complained about. */
printf (NULL, "foo"); /* { dg-warning "too many" "NULL extra args" } */
- /* { dg-warning "null" "null format arg" { target *-*-* } 26 } */
+ /* { dg-warning "null" "null format arg" { target *-*-* } .-1 } */
}
{
printf("%d", x); /* { dg-warning "expects argument" } */
printf("%d", 141592653589793238462643383279502884197169399375105820974944); /* { dg-warning "expects argument" } */
- /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 23 } */
+ /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } .-1 } */
}
foo (void *p)
{
printf ("%d", p); /* { dg-bogus "va_list" "wrong type in format warning" } */
- /* { dg-warning "format" "format error" { target *-*-* } 12 } */
+ /* { dg-warning "format" "format error" { target *-*-* } .-1 } */
}
{
printf("%d", x); /* { dg-warning "expects argument" } */
printf("%d", 141592653589793238462643383279502884197169399375105820974944); /* { dg-warning "expects argument" } */
- /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } 23 } */
+ /* { dg-warning "unsigned only|too large" "constant" { target *-*-* } .-1 } */
}
foo (void *p)
{
printf ("%d", p); /* { dg-bogus "va_list" "wrong type in format warning" } */
- /* { dg-warning "format" "format error" { target *-*-* } 11 } */
+ /* { dg-warning "format" "format error" { target *-*-* } .-1 } */
}
warning about unused arguments rather than the more serious one about
argument gaps. */
scanf ("%3$d%1$d", ip, ip, ip); /* { dg-bogus "before used" "unused $ scanf pointer operand" } */
- /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } 112 } */
+ /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } .-1 } */
/* If there are non-pointer arguments unused at the end, this is also OK. */
scanf ("%3$d%1$d", ip, ip, ip, i); /* { dg-bogus "before used" "unused $ scanf pointer operand" } */
- /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } 115 } */
+ /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } .-1 } */
scanf ("%3$d%1$d", ip, i, ip); /* { dg-warning "before used" "unused $ scanf non-pointer operand" } */
/* Can't check the arguments in the vscanf case, so should suppose the
lesser problem. */
vscanf ("%3$d%1$d", va); /* { dg-bogus "before used" "unused $ scanf pointer operand" } */
- /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } 120 } */
+ /* { dg-warning "unused" "unused $ scanf pointer operand" { target *-*-* } .-1 } */
scanf ("%2$*d%1$d", ip, ip); /* { dg-warning "operand" "operand number with suppression" } */
printf ("%1$d%1$d", i);
scanf ("%1$d%1$d", ip); /* { dg-warning "more than once" "multiple use of scanf argument" } */
/* { dg-options "-Wmissing-prototypes" } */
extern __typeof(foo) foo __asm__(""); /* { dg-error "undeclared" } */
-/* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } 7 } */
+/* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } .-1 } */
void *foo (void) {} /* { dg-error "redeclared as different kind of symbol" } */
-/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } 9 } */
+/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } .-1 } */
/* { dg-options "-Wmissing-prototypes" } */
int foo;
-/* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } 8 } */
+/* { dg-message "note: previous declaration" "previous declaration" { target *-*-* } .-1 } */
void foo () {} /* { dg-error "redeclared as different kind of symbol" } */
-/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } 10 } */
+/* { dg-warning "no previous prototype" "no previous prototype" { target *-*-* } .-1 } */
/* Integer constant expressions may not contain statement
expressions (not a permitted operand). */
E1 = (1 ? 0 : ({ 0; })), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } 16 } */
+ /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } .-1 } */
/* Real and imaginary parts act like other arithmetic
operators. */
E2 = __real__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
/* Conditional expressions with omitted arguments act like the
standard type. */
E10 = (1 ? : i++), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } 32 } */
+ /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } .-1 } */
E11 = (1 ? : 0) /* { dg-error "ISO C forbids omitting" } */
};
enum e2 {
/* Complex integer constants may be cast directly to integer
types, but not after further arithmetic on them. */
F1 = (int) (_Complex int) 2i, /* { dg-error "constant expression" } */
- /* { dg-error "complex" "complex" { target *-*-* } 39 } */
- /* { dg-error "imaginary" "imaginary" { target *-*-* } 39 } */
+ /* { dg-error "complex" "complex" { target *-*-* } .-1 } */
+ /* { dg-error "imaginary" "imaginary" { target *-*-* } .-2 } */
F2 = (int) +2i, /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 42 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F3 = (int) (1 + 2i), /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 44 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F4 = (int) 2i /* { dg-error "imaginary" } */
};
static double dr = __real__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 48 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
static double di = __imag__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 50 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
/* Statement expressions allowed in unevaluated subexpressions in
initializers in gnu99 but not gnu89. */
static int j = (1 ? 0 : ({ 0; })); /* { dg-error "constant expression" } */
- /* { dg-error "braced" "ISO" { target *-*-* } 54 } */
+ /* { dg-error "braced" "ISO" { target *-*-* } .-1 } */
}
constant expression. */
a = __builtin_choose_expr ((void *)0, b, c); /* { dg-error "constant" } */
a = __builtin_choose_expr (0 * (INT_MAX + 1), b, c); /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
a = __builtin_choose_expr (1 / 0, 0, 0); /* { dg-warning "division by zero" } */
- /* { dg-error "not a constant" "error" { target *-*-* } 23 } */
+ /* { dg-error "not a constant" "error" { target *-*-* } .-1 } */
a = __builtin_choose_expr ((1 ? 1 : a), b, c); /* { dg-error "constant" } */
}
/* Integer constant expressions may not contain statement
expressions (not a permitted operand). */
E1 = (1 ? 0 : ({ 0; })), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } 16 } */
+ /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } .-1 } */
/* Real and imaginary parts act like other arithmetic
operators. */
E2 = __real__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
/* Conditional expressions with omitted arguments act like the
standard type. */
E10 = (1 ? : i++), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } 32 } */
+ /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } .-1 } */
E11 = (1 ? : 0) /* { dg-error "ISO C forbids omitting" } */
};
enum e2 {
/* Complex integer constants may be cast directly to integer
types, but not after further arithmetic on them. */
F1 = (int) (_Complex int) 2i, /* { dg-error "constant expression" } */
- /* { dg-error "complex" "complex" { target *-*-* } 39 } */
- /* { dg-error "imaginary" "imaginary" { target *-*-* } 39 } */
+ /* { dg-error "complex" "complex" { target *-*-* } .-1 } */
+ /* { dg-error "imaginary" "imaginary" { target *-*-* } .-2 } */
F2 = (int) +2i, /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 42 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F3 = (int) (1 + 2i), /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 44 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F4 = (int) 2i /* { dg-error "imaginary" } */
};
static double dr = __real__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 48 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
static double di = __imag__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 50 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
/* Statement expressions allowed in unevaluated subexpressions in
initializers in gnu99 but not gnu89. */
static int j = (1 ? 0 : ({ 0; })); /* { dg-error "constant expression" } */
- /* { dg-error "braced" "ISO" { target *-*-* } 54 } */
+ /* { dg-error "braced" "ISO" { target *-*-* } .-1 } */
}
/* Integer constant expressions may not contain statement
expressions (not a permitted operand). */
E1 = (1 ? 0 : ({ 0; })), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } 16 } */
+ /* { dg-error "ISO C forbids braced-groups" "ISO" { target *-*-* } .-1 } */
/* Real and imaginary parts act like other arithmetic
operators. */
E2 = __real__ (1 ? 0 : i++), /* { dg-error "constant expression" } */
/* Conditional expressions with omitted arguments act like the
standard type. */
E10 = (1 ? : i++), /* { dg-error "constant expression" } */
- /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } 32 } */
+ /* { dg-error "ISO C forbids omitting" "ISO" { target *-*-* } .-1 } */
E11 = (1 ? : 0) /* { dg-error "ISO C forbids omitting" } */
};
enum e2 {
/* Complex integer constants may be cast directly to integer
types, but not after further arithmetic on them. */
F1 = (int) (_Complex int) 2i, /* { dg-error "constant expression" } */
- /* { dg-error "complex" "complex" { target *-*-* } 39 } */
- /* { dg-error "imaginary" "imaginary" { target *-*-* } 39 } */
+ /* { dg-error "complex" "complex" { target *-*-* } .-1 } */
+ /* { dg-error "imaginary" "imaginary" { target *-*-* } .-2 } */
F2 = (int) +2i, /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 42 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F3 = (int) (1 + 2i), /* { dg-error "constant expression" } */
- /* { dg-error "imaginary" "ISO" { target *-*-* } 44 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
F4 = (int) 2i /* { dg-error "imaginary" } */
};
static double dr = __real__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 48 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
static double di = __imag__ (1.0 + 2.0i);
- /* { dg-error "imaginary" "ISO" { target *-*-* } 50 } */
+ /* { dg-error "imaginary" "ISO" { target *-*-* } .-1 } */
/* Statement expressions allowed in unevaluated subexpressions in
initializers in gnu99 but not gnu89. */
static int j = (1 ? 0 : ({ 0; }));
- /* { dg-error "braced" "ISO" { target *-*-* } 54 } */
+ /* { dg-error "braced" "ISO" { target *-*-* } .-1 } */
}
constant expression. */
a = __builtin_choose_expr ((void *)0, b, c); /* { dg-error "constant" } */
a = __builtin_choose_expr (0 * (INT_MAX + 1), b, c); /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
a = __builtin_choose_expr (1 / 0, 0, 0); /* { dg-warning "division by zero" } */
- /* { dg-error "not a constant" "error" { target *-*-* } 23 } */
+ /* { dg-error "not a constant" "error" { target *-*-* } .-1 } */
a = __builtin_choose_expr ((1 ? 1 : a), b, c); /* { dg-error "constant" } */
}
/* { dg-options "-std=gnu99" } */
int a[] = { [(void *)0 ... 0] = 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } 7 } */
+/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } .-1 } */
int b[] = { [0 ... (void *)0] = 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } 10 } */
+/* { dg-error "integer type|near init" "pointer designator" { target *-*-* } .-1 } */
#pragma omp target map(from: b[1:1]) /* { dg-error "'_Atomic' 'b' in 'map' clause" } */
;
#pragma omp target map(to: c.a) /* { dg-error "'_Atomic' 'c.a' in 'map' clause" } */
- /* { dg-warning "accessing a member 'a' of an atomic structure 'c'" "" { target *-*-* } 27 } */
+ /* { dg-warning "accessing a member 'a' of an atomic structure 'c'" "" { target *-*-* } .-1 } */
;
#pragma omp target map(to: c.b[1]) /* { dg-error "'_Atomic' 'c.b' in 'map' clause" } */
- /* { dg-warning "accessing a member 'b' of an atomic structure 'c'" "" { target *-*-* } 30 } */
+ /* { dg-warning "accessing a member 'b' of an atomic structure 'c'" "" { target *-*-* } .-1 } */
;
#pragma omp target data map(c) /* { dg-error "'_Atomic' 'c' in 'map' clause" } */
- /* { dg-error "must contain at least one" "" { target *-*-* } 33 } */
+ /* { dg-error "must contain at least one" "" { target *-*-* } .-1 } */
{
#pragma omp target update to (c.a) /* { dg-error "'_Atomic' 'c.a' in 'to' clause" } */
- /* { dg-error "must contain at least one" "" { target *-*-* } 36 } */
- /* { dg-warning "accessing a member 'a' of an atomic structure 'c'" "" { target *-*-* } 36 } */
+ /* { dg-error "must contain at least one" "" { target *-*-* } .-1 } */
+ /* { dg-warning "accessing a member 'a' of an atomic structure 'c'" "" { target *-*-* } .-2 } */
#pragma omp target update from (c.b[1]) /* { dg-error "'_Atomic' 'c.b' in 'from' clause" } */
- /* { dg-error "must contain at least one" "" { target *-*-* } 39 } */
- /* { dg-warning "accessing a member 'b' of an atomic structure 'c'" "" { target *-*-* } 39 } */
+ /* { dg-error "must contain at least one" "" { target *-*-* } .-1 } */
+ /* { dg-warning "accessing a member 'b' of an atomic structure 'c'" "" { target *-*-* } .-2 } */
#pragma omp target update to (c) /* { dg-error "'_Atomic' 'c' in 'to' clause" } */
- /* { dg-error "must contain at least one" "" { target *-*-* } 42 } */
+ /* { dg-error "must contain at least one" "" { target *-*-* } .-1 } */
}
#pragma omp target map(to: c.c[0:]) /* { dg-error "'_Atomic' 'c.c' in 'map' clause" } */
- /* { dg-warning "accessing a member 'c' of an atomic structure 'c'" "" { target *-*-* } 45 } */
+ /* { dg-warning "accessing a member 'c' of an atomic structure 'c'" "" { target *-*-* } .-1 } */
;
#pragma omp target map(to: p[1:2]) /* { dg-error "'_Atomic' 'p' in 'map' clause" } */
;
x = c; /* O.K. - x is threadprivate */
/* - c has const-qualified type */
z[i] = y;
- /* { dg-error "'i' not specified" "" { target *-*-* } 21 } */
+ /* { dg-error "'i' not specified" "" { target *-*-* } .-1 } */
/* { dg-error "enclosing 'parallel'" "" { target *-*-* } 13 } */
/* { dg-error "'y' not specified" "" { target *-*-* } 21 } */
#pragma omp for firstprivate(y)
/* - y is listed in firstprivate clause */
}
z[l] = t;
- /* { dg-error "'l' not specified" "" { target *-*-* } 31 } */
- /* { dg-error "'t' not specified" "" { target *-*-* } 31 } */
+ /* { dg-error "'l' not specified" "" { target *-*-* } .-1 } */
+ /* { dg-error "'t' not specified" "" { target *-*-* } .-2 } */
}
}
;
/* Check that we didn't get stuck on the pragma eol marker. */
undef; /* { dg-error "" } */
- /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } 37 } */
+ /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } .-1 } */
}
f4 (void)
{
#pragma omp for linear (i:1) linear (j:2) collapse(2) /* { dg-error "iteration variable .i. should not be linear" } */
- for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 33 } */
+ for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } .-1 } */
for (j = 0; j < 32; j+=2)
;
}
f6 (void)
{
#pragma omp parallel for linear (i:1) collapse(2) linear (j:2) /* { dg-error "iteration variable .i. should not be linear" } */
- for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } 51 } */
+ for (i = 0; i < 32; i++) /* { dg-error "iteration variable .j. should not be linear" "" { target *-*-* } .-1 } */
for (j = 0; j < 32; j+=2)
;
}
/* { dg-options "-fopenmp" } */
#pragma omp declare simd simdlen(d) /* { dg-error "clause expression must be positive constant integer expression" } */
-void f1 (int); /* { dg-error "undeclared here" "" { target *-*-* } 5 } */
+void f1 (int); /* { dg-error "undeclared here" "" { target *-*-* } .-1 } */
#pragma omp declare simd simdlen(0.5) /* { dg-error "clause expression must be positive constant integer expression" } */
void f2 (int);
#pragma omp declare simd simdlen(-2) /* { dg-error "clause expression must be positive constant integer expression" } */
{
int i;
#pragma omp simd safelen(d) /* { dg-error "must be positive constant integer expression" } */
- for (i = 0; i < 16; ++i) /* { dg-error "undeclared" "" { target *-*-* } 18 } */
+ for (i = 0; i < 16; ++i) /* { dg-error "undeclared" "" { target *-*-* } .-1 } */
;
#pragma omp simd safelen(0.5) /* { dg-error "must be positive constant integer expression" } */
for (i = 0; i < 16; ++i)
int a = 1; /* { dg-error "parameter 'a' is initialized" } */
{
struct s x = { 0 }; /* { dg-error "variable 'x' has initializer but incomplete type" } */
- /* { dg-warning "excess elements|near init" "excess" { target *-*-* } 12 } */
- /* { dg-error "storage size" "size" { target *-*-* } 12 } */
+ /* { dg-warning "excess elements|near init" "excess" { target *-*-* } .-1 } */
+ /* { dg-error "storage size" "size" { target *-*-* } .-2 } */
}
char s[1] = "x";
char t[1] = "xy"; /* { dg-warning "initializer-string for array of chars is too long" } */
char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of chars is too long" } */
char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 21 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int i = { }; /* { dg-error "empty scalar initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 24 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int j = { 1 };
int k = { 1, 2 }; /* { dg-warning "excess elements in scalar initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 29 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a1[1] = { [1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 32 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a2[1] = { [-1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 34 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a3[1] = { [0 ... 1] = 0 }; /* { dg-error "array index range in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 36 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a4[2] = { [1 ... 0] = 0 }; /* { dg-error "empty index range in initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 38 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a5[2] = { [0 ... 2] = 0 }; /* { dg-error "array index range in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 40 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a6[2] = { [-1 ... 1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 42 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a7[] = { [-1 ... 1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 44 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a = 1; /* { dg-error "parameter 'a' is initialized" } */
{
struct s x = { 0 }; /* { dg-error "variable 'x' has initializer but incomplete type" } */
- /* { dg-message "excess elements|near init" "near" { target *-*-* } 13 } */
- /* { dg-error "storage size" "size" { target *-*-* } 13 } */
+ /* { dg-message "excess elements|near init" "near" { target *-*-* } .-1 } */
+ /* { dg-error "storage size" "size" { target *-*-* } .-2 } */
}
char s[1] = "x";
char t[1] = "xy"; /* { dg-warning "initializer-string for array of chars is too long" } */
char t1[1] = { "xy" }; /* { dg-warning "initializer-string for array of chars is too long" } */
char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 22 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int j = { 1 };
int k = { 1, 2 }; /* { dg-warning "excess elements in scalar initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 27 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a1[1] = { [1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 30 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a2[1] = { [-1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 32 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a = 1; /* { dg-error "parameter 'a' is initialized" } */
{
struct s x = { 0 }; /* { dg-error "variable 'x' has initializer but incomplete type" } */
- /* { dg-message "excess elements|near init" "near" { target *-*-* } 13 } */
- /* { dg-error "storage size" "size" { target *-*-* } 13 } */
+ /* { dg-message "excess elements|near init" "near" { target *-*-* } .-1 } */
+ /* { dg-error "storage size" "size" { target *-*-* } .-2 } */
}
char s[1] = "x";
char t[1] = "xy"; /* { dg-error "initializer-string for array of chars is too long" } */
char t1[1] = { "xy" }; /* { dg-error "initializer-string for array of chars is too long" } */
char u[1] = { "x", "x" }; /* { dg-error "excess elements in char array initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 22 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int j = { 1 };
int k = { 1, 2 }; /* { dg-error "excess elements in scalar initializer" } */
-/* { dg-message "near init" "near" { target *-*-* } 27 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a1[1] = { [1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 30 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
int a2[1] = { [-1] = 0 }; /* { dg-error "array index in initializer exceeds array bounds" } */
-/* { dg-message "near init" "near" { target *-*-* } 32 } */
+/* { dg-message "near init" "near" { target *-*-* } .-1 } */
char d[] = "d";
char e[] = ("e"); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 14 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
char f[] = (("f")); /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 16 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
signed char g[] = { "d" };
unsigned char h[] = { ("e") }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 20 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
signed char i[] = { (("f")) }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 22 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
struct s { char a[10]; int b; wchar_t c[10]; };
/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 31 } */
struct s k = {
(("k")), /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 35 } */
+ /* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
1,
L"k"
};
struct s l = {
.c = (L"l"), /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 42 } */
+ /* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
.a = "l"
};
char *n = (char []){ "n" };
char *o = (char []){ ("o") }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 55 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
wchar_t *p = (wchar_t [5]){ (L"p") }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } 58 } */
+/* { dg-error "parenthesized|near init" "paren array" { target *-*-* } .-1 } */
/* { dg-options "" } */
void f(void) { g: } /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "label|parse|syntax" "label at end of compound statement" { target *-*-* } 6 } */
+/* { dg-error "label|parse|syntax" "label at end of compound statement" { target *-*-* } .-1 } */
void
f (void)
{
- __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 11 } */
+ __label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } . } */
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
goto c; /* { dg-error "label 'c' used but not defined" } */
a: (void)0;
f (void)
{
__label__ a, b, a; /* { dg-error "duplicate label declaration 'a'" } */
- /* { dg-message "note: previous declaration of 'a' was here" "previous" { target *-*-* } 9 } */
+ /* { dg-message "note: previous declaration of 'a' was here" "previous" { target *-*-* } .-1 } */
__label__ c; /* { dg-message "note: previous declaration of 'c' was here" } */
__label__ c; /* { dg-error "duplicate label declaration 'c'" } */
return;
static char * name[] = {
[0x80000000] = "bar"
};
-/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } .-1 } */
static char * name[] = {
[0x80000000] = "bar"
};
-/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } 6 } */
+/* { dg-error "too large" "" { target { { ! lp64 } && { ! llp64 } } } .-1 } */
extern void *pv;
void f2 (void) { &*pv; } /* { dg-warning "dereferencing" } */
-/* { dg-error "taking address of expression of type 'void'" "C90 only error" { target *-*-* } 10 } */
+/* { dg-error "taking address of expression of type 'void'" "C90 only error" { target *-*-* } .-1 } */
extern const void cv;
void f3 (void) { &cv; }
struct vtable mtable = {
malloc,
free
-}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } 18 } */
+}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } . } */
/* { dg-message "declared here" "warning regression 2" { target *-*-* } 12 } */
/* With designated initializers, we assume you meant to leave out the
g (void)
{
return - - - - -INT_MIN; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
- /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
+ /* { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 } */
}
g1 (void)
{
return INT_MAX + 1 - INT_MAX; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
- /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
+ /* { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 } */
}
g (void)
{
short int wc = ((short int)1 << (8 * __SIZEOF_INT__ - 1)) - 1; /* { dg-bogus "overflow .* overflow" } */
- /* { dg-warning "overflow" "" { target *-*-* } 8 } */
+ /* { dg-warning "overflow" "" { target *-*-* } .-1 } */
return wc;
}
enum e1 {
E2 = sizeof(enum e2 { E2 }), /* { dg-error "redeclaration of enumerator 'E2'" } */
- /* { dg-message "note: previous definition" "previous E2" { target *-*-* } 38 } */
+ /* { dg-message "note: previous definition" "previous E2" { target *-*-* } .-1 } */
E3
};
int asm; /* { dg-error "before .asm." } */
int inline; /* { dg-warning "empty declaration" } */
-/* { dg-error "empty declaration" "" { target *-*-* } 8 } */
+/* { dg-error "empty declaration" "" { target *-*-* } .-1 } */
int typeof; /* { dg-error "before .typeof." } */
int asm; /* { dg-error "before .asm." } */
int inline; /* { dg-warning "empty declaration" } */
-/* { dg-error "empty declaration" "" { target *-*-* } 8 } */
+/* { dg-error "empty declaration" "" { target *-*-* } .-1 } */
int typeof; /* { dg-error "before .typeof." } */
int asm; /* { dg-bogus "before .asm." } */
int inline; /* { dg-warning "empty declaration" } */
-/* { dg-error "empty declaration" "" { target *-*-* } 9 } */
+/* { dg-error "empty declaration" "" { target *-*-* } .-1 } */
int typeof; /* { dg-bogus "before .typeof." } */
int i = 7 / 0; /* { dg-error "not constant" } */
- /* { dg-warning "division by zero" "div by zero" { target *-*-* } 1 } */
+ /* { dg-warning "division by zero" "div by zero" { target *-*-* } .-1 } */
struct A
{
enum E : 8; /* { dg-warning "narrower than values of its type" } */
- /* { dg-error "has incomplete type" "incomplete" { target *-*-* } 6 } */
+ /* { dg-error "has incomplete type" "incomplete" { target *-*-* } .-1 } */
};
/* PR c/44517: Improve diagnostic for misspelled typename in function declaration. */
int f1(int x, pid_t y, long z, in t) {
-/* { dg-error "unknown type name 'pid_t'" "pid_t" { target *-*-* } 2 } */
-/* { dg-error "unknown type name 'in'" "in" { target *-*-* } 2 } */
+/* { dg-error "unknown type name 'pid_t'" "pid_t" { target *-*-* } .-1 } */
+/* { dg-error "unknown type name 'in'" "in" { target *-*-* } .-2 } */
return x + y + z + t;
}
-/* { dg-error "undeclared here" "undeclared" { target *-*-* } 3 } */
-/* { dg-error "expected" "expected" { target *-*-* } 3 } */
+/* { dg-error "undeclared here" "undeclared" { target *-*-* } .+2 } */
+/* { dg-error "expected" "expected" { target *-*-* } .+1 } */
int f()[j]
foo5(void)
{
return; /* { dg-warning "'noreturn' has a 'return' statement" "detect invalid return" } */
-} /* { dg-warning "function does return" "detect return from noreturn" { target c } 37 } */
+} /* { dg-warning "function does return" "detect return from noreturn" { target c } .-1 } */
extern void foo6(void);
void
in the standard). */
E2 = 2 || 1 / 0,
E3 = 1 / 0, /* { dg-warning "10:division by zero" } */
- /* { dg-error "3:enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "3:enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "15:division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "16:integer overflow in expression" } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "21:integer overflow in expression" } */
struct s {
int a;
int : 0 * (1 / 0); /* { dg-warning "16:division by zero" } */
- /* { dg-error "not an integer constant" "22:integer constant" { target *-*-* } 30 } */
+ /* { dg-error "not an integer constant" "22:integer constant" { target *-*-* } .-1 } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
};
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 49 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } 51 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 51 } */
+/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } .-1 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } 61 } */
+ /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } .-1 } */
;
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
;
in the standard). */
E2 = 2 || 1 / 0,
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
struct s {
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
- /* { dg-error "not an integer constant" "integer constant" { target *-*-* } 30 } */
+ /* { dg-error "not an integer constant" "integer constant" { target *-*-* } .-1 } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
};
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 49 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-1 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } 51 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 51 } */
+/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } .-1 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } 61 } */
+ /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } .-1 } */
;
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
;
h2 (void)
{
fsc (SCHAR_MAX + 1);
- /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 87 } */
+ /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fsc (SCHAR_MIN - 1); /* { dg-warning "overflow in implicit constant conversion" } */
- /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 89 } */
+ /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fsc (UCHAR_MAX);
- /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 91 } */
+ /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fsc (UCHAR_MAX + 1); /* { dg-warning "overflow in implicit constant conversion" } */
- /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 93 } */
+ /* { dg-warning "passing argument 1 of 'fsc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fuc (-1);
- /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 95 } */
+ /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fuc (UCHAR_MAX + 1); /* { dg-warning "large integer implicitly truncated to unsigned type" } */
- /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 97 } */
+ /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fuc (SCHAR_MIN);
- /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 99 } */
+ /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fuc (SCHAR_MIN - 1); /* { dg-warning "large integer implicitly truncated to unsigned type" } */
- /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 101 } */
+ /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
fuc (-UCHAR_MAX); /* { dg-warning "large integer implicitly truncated to unsigned type" } */
- /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } 103 } */
+ /* { dg-warning "passing argument 1 of 'fuc' with different width due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
}
void fui (unsigned int);
fsi (UINT_MAX); /* { dg-warning "passing argument 1 of 'fsi' as signed due to prototype" } */
si = UINT_MAX;
fui (-1);
- /* { dg-warning "passing argument 1 of 'fui' as unsigned due to prototype" "-Wtraditional-conversion" { target *-*-* } 127 } */
+ /* { dg-warning "passing argument 1 of 'fui' as unsigned due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
ui = -1;
ui = x ? -1 : 1U;
fui (INT_MIN);
- /* { dg-warning "passing argument 1 of 'fui' as unsigned due to prototype" "-Wtraditional-conversion" { target *-*-* } 131 } */
+ /* { dg-warning "passing argument 1 of 'fui' as unsigned due to prototype" "-Wtraditional-conversion" { target *-*-* } .-1 } */
ui = INT_MIN;
ui = x ? INT_MIN : 1U;
}
in the standard). */
E2 = 2 || 1 / 0,
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 24 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* A cast does not constitute overflow in conversion. */
E7 = (char) INT_MAX
};
struct s {
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
- /* { dg-error "not an integer constant" "integer constant" { target *-*-* } 32 } */
+ /* { dg-error "not an integer constant" "integer constant" { target *-*-* } .-1 } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 34 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
};
void
/* But this expression does need to be constant. */
static int sc = INT_MAX + 1; /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 48 } */
+/* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* The first two of these involve overflow, so are not null pointer
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 54 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 54 } */
+/* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } 57 } */
-/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } 57 } */
+/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } .-1 } */
+/* { dg-warning "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } 67 } */
+ /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } .-1 } */
;
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
- /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } 70 } */
+ /* { dg-warning "overflow in constant expression" "constant" { target *-*-* } .-1 } */
;
}
}
in the standard). */
E2 = 2 || 1 / 0,
E3 = 1 / 0, /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } 15 } */
+ /* { dg-error "enumerator value for 'E3' is not an integer constant" "enum error" { target *-*-* } .-1 } */
/* But as in DR#031, the 1/0 in an evaluated subexpression means the
whole expression violates the constraints. */
E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
- /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } 19 } */
+ /* { dg-error "enumerator value for 'E4' is not an integer constant" "enum error" { target *-*-* } .-1 } */
E5 = INT_MAX + 1, /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 21 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* Again, overflow in evaluated subexpression. */
E6 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 24 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* A cast does not constitute overflow in conversion. */
E7 = (char) INT_MAX
};
struct s {
int a;
int : 0 * (1 / 0); /* { dg-warning "division by zero" } */
- /* { dg-error "not an integer constant" "integer constant" { target *-*-* } 32 } */
+ /* { dg-error "not an integer constant" "integer constant" { target *-*-* } .-1 } */
int : 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 34 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
};
void
/* But this expression does need to be constant. */
static int sc = INT_MAX + 1; /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 48 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
/* The first two of these involve overflow, so are not null pointer
constants. The third has the overflow in an unevaluated
subexpression, so is a null pointer constant. */
void *p = 0 * (INT_MAX + 1); /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 54 } */
-/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } 54 } */
+/* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
+/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *q = 0 * (1 / 0); /* { dg-warning "division by zero" } */
-/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } 57 } */
-/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } 57 } */
+/* { dg-error "initializer element is not computable at load time" "constant" { target *-*-* } .-1 } */
+/* { dg-error "initialization makes pointer from integer without a cast" "null" { target *-*-* } .-2 } */
void *r = (1 ? 0 : INT_MAX+1);
void
switch (i)
{
case 0 * (1/0): /* { dg-warning "division by zero" } */
- /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } 67 } */
+ /* { dg-error "case label does not reduce to an integer constant" "constant" { target *-*-* } .-1 } */
;
case 1 + 0 * (INT_MAX + 1): /* { dg-warning "integer overflow in expression" } */
- /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 70 } */
+ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */
;
}
}
void f0(); /* { dg-message "note: previous declaration of 'f0' was here" } */
void f0(int, ...); /* { dg-error "conflicting types for 'f0'" } */
-/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 8 } */
+/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
void f1(int, ...); /* { dg-message "note: previous declaration of 'f1' was here" } */
void f1(); /* { dg-error "conflicting types for 'f1'" } */
-/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 11 } */
+/* { dg-message "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
void f2(); /* { dg-message "note: previous declaration of 'f2' was here" } */
void f2(char); /* { dg-error "conflicting types for 'f2'" } */
-/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 14 } */
+/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
void f3(char); /* { dg-message "note: previous declaration of 'f3' was here" } */
void f3(); /* { dg-error "conflicting types for 'f3'" } */
-/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 17 } */
+/* { dg-message "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } .-1 } */
z = __complex__ (1.90000007326203904e+19, 0.0); /* { dg-error "__complex__" } */
z = __complex__ (1.0e+0, 0.0) / z; /* { dg-error "__complex__" "Complex" } */
- /* { dg-error "at end of input" "end of input" { target *-*-* } 10 } */
+ /* { dg-error "at end of input" "end of input" { target *-*-* } .-1 } */
z = _Complex (1.90000007326203904e+19, 0.0); /* { dg-error "_Complex" } */
z = _Complex (1.0e+0, 0.0) / z; /* { dg-error "_Complex" "_Complex" } */
- /* { dg-error "at end of input" "end of input" { target *-*-* } 10 } */
+ /* { dg-error "at end of input" "end of input" { target *-*-* } .-1 } */
int a2[2] = { 1, 2, 3 }; /* { dg-warning "21:excess elements in array initializer" } */
int a3[] = { [1 ? 1 : i] = 0 }; /* { dg-warning "15:array index in initializer is not an integer constant expression" } */
int a4[] = { [1 ... 1 ? 2 : i] = 0 }; /* { dg-warning "15:array index in initializer is not an integer constant expression" } */
-/* { dg-warning "ISO C forbids" "ISO C" { target *-*-* } 14 } */
+/* { dg-warning "ISO C forbids" "ISO C" { target *-*-* } .-1 } */
char a5[] = ("lol"); /* { dg-warning "13:array initialized from parenthesized string constant" } */
char a6[] = { ("foo") }; /* { dg-warning "13:array initialized from parenthesized string constant" } */
char *a7 = (char []) { ("bar") }; /* { dg-warning "12:array initialized from parenthesized string constant" } */
f -= 0; /* { dg-warning "pointer to a function used in arithmetic" } */
f -= 1; /* { dg-warning "pointer to a function used in arithmetic" } */
p[0]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 33 } */
+ /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
0[p]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 35 } */
+ /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
f[0]; /* { dg-error "subscripted value is pointer to function" } */
0[f]; /* { dg-error "subscripted value is pointer to function" } */
p - p; /* { dg-warning "pointer of type 'void \\*' used in subtraction" } */
f -= 0; /* { dg-warning "pointer to a function used in arithmetic" } */
f -= 1; /* { dg-warning "pointer to a function used in arithmetic" } */
p[0]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 33 } */
+ /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
0[p]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 35 } */
+ /* { dg-warning "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
f[0]; /* { dg-error "subscripted value is pointer to function" } */
0[f]; /* { dg-error "subscripted value is pointer to function" } */
p - p; /* { dg-warning "pointer of type 'void \\*' used in subtraction" } */
f -= 0; /* { dg-error "pointer to a function used in arithmetic" } */
f -= 1; /* { dg-error "pointer to a function used in arithmetic" } */
p[0]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-error "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 33 } */
+ /* { dg-error "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
0[p]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
- /* { dg-error "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } 35 } */
+ /* { dg-error "pointer of type 'void \\*' used in arithmetic" "array 1" { target *-*-* } .-1 } */
f[0]; /* { dg-error "subscripted value is pointer to function" } */
0[f]; /* { dg-error "subscripted value is pointer to function" } */
p - p; /* { dg-error "pointer of type 'void \\*' used in subtraction" } */
struct tree_common
{
enum tree_code code : 8; /* { dg-error "ISO C forbids forward references to" "forward ref" } */
- /* { dg-error "type of bit-field .code. is a GCC extension" "extension" { target *-*-* } 6 } */
- /* { dg-warning "narrower than values of its type" "narrower" { target *-*-* } 6 } */
- /* { dg-error "incomplete type" "incomplete" { target *-*-* } 6 } */
+ /* { dg-error "type of bit-field .code. is a GCC extension" "extension" { target *-*-* } .-1 } */
+ /* { dg-warning "narrower than values of its type" "narrower" { target *-*-* } .-2 } */
+ /* { dg-error "incomplete type" "incomplete" { target *-*-* } .-3 } */
};
static g () = 0; /* { dg-error "invalid storage class" } */
static int f () = 1; /* { dg-error "invalid storage class" } */
auto int h () = 0; /* { dg-error "initialized like a variable" } */
- /* { dg-error "declared but never defined" "nested" { target *-*-* } 8 } */
+ /* { dg-error "declared but never defined" "nested" { target *-*-* } .-1 } */
static int i () = { 0 }; /* { dg-error "invalid storage class" } */
static int j () = /* { dg-error "invalid storage class" } */
{ 0, 0.0 };
/* { dg-do compile } */
void foo(enum E e) {} /* { dg-error "forward ref" "forward" } */
- /* { dg-warning "declared" "declared" { target *-*-* } 6 } */
- /* { dg-error "incomplete" "incomplete" { target *-*-* } 6 } */
+ /* { dg-warning "declared" "declared" { target *-*-* } .-1 } */
+ /* { dg-error "incomplete" "incomplete" { target *-*-* } .-2 } */
void bar() { foo(0); }
/* PR c/27953 */
void foo(struct A a) {} /* { dg-warning "declared inside parameter list" "inside" } */
-/* { dg-error "incomplete type" "incomplete" { target *-*-* } 3 } */
+/* { dg-error "incomplete type" "incomplete" { target *-*-* } .-1 } */
void foo() {} /* { dg-error "redefinition" "redef" } */
/* { dg-message "note: previous definition" "previous" { target *-*-* } 3 } */
/* Undefined by C99 7.15.1.1p2: */
(void) va_arg(ap, char); /* { dg-warning "'char' is promoted to 'int' when passed through '...'" "promoted" } */
- /* { dg-message "note: .so you should pass .int. not .char. to .va_arg.." "int not char" { target *-*-* } 20 } */
- /* { dg-message "note: if this code is reached, the program will abort" "will abort" { target *-*-* } 20 } */
+ /* { dg-message "note: .so you should pass .int. not .char. to .va_arg.." "int not char" { target *-*-* } .-1 } */
+ /* { dg-message "note: if this code is reached, the program will abort" "will abort" { target *-*-* } .-2 } */
va_end(ap);
}
/* { dg-options "" } */
void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
-/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
/* { dg-options "-pedantic-errors" } */
/* { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } */
void main(char a) {} /* { dg-error "first argument of .main. should be .int." "int" } */
-/* { dg-error ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-error "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-error ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-error "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
/* { dg-options "-pedantic-errors -Wno-main" } */
void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
-/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
/* { dg-options "-pedantic -Wno-main" } */
void main(char a) {} /* { dg-bogus "first argument of .main. should be .int." "int" } */
-/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-bogus ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-bogus "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
/* { dg-options "-pedantic" } */
/* { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } */
void main(char a) {} /* { dg-warning "first argument of .main. should be .int." "int" } */
-/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
/* { dg-options "-Wall" } */
/* { dg-skip-if "-Wmain not enabled with -Wall on SPU" { spu-*-* } } */
void main(char a) {} /* { dg-warning "first argument of .main. should be .int." "int" } */
-/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */
-/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } 5 } */
+/* { dg-warning ".main. takes only zero or two arguments" "zero or two" { target *-*-* } .-1 } */
+/* { dg-warning "return type of .main. is not .int." "return type" { target *-*-* } .-2 } */
__m64 _mm_add_si64 (__m64 __m1, __m64 __m2)
{
return (__m64) __builtin_ia32_paddq ((long long)__m1, (long long)__m2); /* { dg-error "incompatible type" } */
- /* { dg-message "note: expected '__vector.1. long long int' but argument is of type 'long long int'" "" { target *-*-* } 7 } */
+ /* { dg-message "note: expected '__vector.1. long long int' but argument is of type 'long long int'" "" { target *-*-* } .-1 } */
}
f ()
{
char x[g (h)]; /* { dg-error "undeclared" } */
-/* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } 7 } */
+/* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } .-1 } */
}
f1 (void *x)
{
__asm volatile ("" : : "r" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 10 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
void
f2 (void *x)
{
__asm volatile ("" : "=r" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 16 } */
- /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 16 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
+ /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
void
f3 (void *x)
{
f5 (void *x)
{
__asm volatile ("" : : "g" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 34 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
void
f6 (void *x)
{
__asm volatile ("" : "=g" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 40 } */
- /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 40 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
+ /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
void
f7 (struct S *x)
{
f1 (void *x)
{
__asm ("" : : "r" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 10 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
void
f2 (void *x)
{
__asm ("" : "=r" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 16 } */
- /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 16 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
+ /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
void
f3 (void *x)
{
f5 (void *x)
{
__asm ("" : : "g" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 34 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
void
f6 (void *x)
{
__asm ("" : "=g" (*x)); /* { dg-warning "dereferencing" "deref" } */
-} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 40 } */
- /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 40 } */
+} /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
+ /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
void
f7 (struct S *x)
{
math (double d, int *ex, double *dp)
{
acos (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 8 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
acosh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 10 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
asin (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 12 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
asinh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 14 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
atan (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 16 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
atanh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 18 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
atan2 (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 20 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
cbrt (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 22 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
ceil (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 24 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
copysign (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 26 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
cos (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 28 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
cosh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 30 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
erf (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 32 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
erfc (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 34 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
exp (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 36 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
exp2 (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 38 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
expm1 (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 40 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fabs (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 42 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fdim (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 44 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
floor (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 46 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fma (d, d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 48 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fmax (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 50 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fmin (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 52 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
fmod (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 54 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
frexp (d, ex); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 56 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
hypot (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 58 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
/* We don't generate the warning for ilogb. */
ilogb (d);
ldexp (d, *ex); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 62 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
lgamma (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 64 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
llrint (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 66 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
llround (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 68 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
log (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 70 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
log10 (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 72 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
log1p (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 74 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
log2 (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 76 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
logb (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 78 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
lrint (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 80 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
lround (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 82 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
modf (d, dp); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 84 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
nan (""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 86 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
nearbyint (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 88 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
nextafter (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 90 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
nexttoward (d, 20.0L); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 92 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
pow (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 94 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
remainder (d, d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 96 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
remquo (d, d, ex); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 98 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
rint (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 100 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
round (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 102 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
scalbln (d, 100L); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 104 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
scalbn (d, 100); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 106 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
sin (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 108 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
sinh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 110 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
sincos (d, dp, dp); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 112 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
sqrt (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 114 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
tan (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 116 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
tanh (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 118 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
tgamma (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 120 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
trunc (d); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..math.h.." "" { target *-*-* } 122 } */
+ /* { dg-message "include ..math.h.." "" { target *-*-* } .-1 } */
}
void
cmplx (double _Complex z)
{
cabs (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 129 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cacos (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 131 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cacosh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 133 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
carg (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 135 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
casin (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 137 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
casinh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 139 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
catan (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 141 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
catanh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 143 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
ccos (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 145 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
ccosh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 147 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cexp (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 149 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cimag (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 151 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
clog (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 153 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
conj (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 155 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cpow (z, z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 157 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
cproj (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 159 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
creal (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 161 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
csin (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 163 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
csinh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 165 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
csqrt (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 167 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
ctan (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 169 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
ctanh (z); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..complex.h.." "" { target *-*-* } 171 } */
+ /* { dg-message "include ..complex.h.." "" { target *-*-* } .-1 } */
}
void
string (void *p, void *q, __SIZE_TYPE__ sz)
{
memchr (p, 2, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 178 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
/* We don't generate the warning for memcmp. */
memcmp (p, q, sz);
memcpy (p, q, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 182 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
memmove (p, q, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 184 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
memset (p, 0, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 186 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strcat (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 188 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strchr (p, 'a'); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 190 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
/* We don't generate the warning for strcmp. */
strcmp (p, q);
strcpy (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 194 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strcspn (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 196 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strlen (p); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 198 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strncat (p, q, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 200 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
/* We don't generate the warning for strncmp. */
strncmp (p, q, sz);
strncpy (p, q, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 204 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strpbrk (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 206 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strrchr (p, 'q'); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 208 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strspn (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 210 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
strstr (p, q); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..string.h.." "" { target *-*-* } 212 } */
+ /* { dg-message "include ..string.h.." "" { target *-*-* } .-1 } */
}
/* Fake FILE. */
stdio (FILE *fp, void *p, __SIZE_TYPE__ sz)
{
fprintf (fp, ""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 222 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
fscanf (fp, ""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 224 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
fwrite (p, sz, sz, fp); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 226 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
printf (""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 228 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
scanf (""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 230 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
snprintf ("", sz, ""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 232 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
sprintf ("", ""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 234 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
sscanf ("", ""); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdio.h.." "" { target *-*-* } 236 } */
+ /* { dg-message "include ..stdio.h.." "" { target *-*-* } .-1 } */
}
void
stdlib (void *p, void *q, __SIZE_TYPE__ sz)
{
abort (); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 243 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
calloc (sz, 1); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 245 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
exit (1); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 247 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
free (p); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 249 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
labs (1L); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 251 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
llabs (1LL); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 253 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
malloc (sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 255 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
realloc (p, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 257 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
aligned_alloc (sz, sz); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..stdlib.h.." "" { target *-*-* } 259 } */
+ /* { dg-message "include ..stdlib.h.." "" { target *-*-* } .-1 } */
}
void
inttypes (__INTMAX_TYPE__ j)
{
imaxabs (j); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..inttypes.h.." "" { target *-*-* } 266 } */
+ /* { dg-message "include ..inttypes.h.." "" { target *-*-* } .-1 } */
}
struct tm;
timeh (char *s, __SIZE_TYPE__ sz, struct tm *tm)
{
strftime (s, sz, "", tm); /* { dg-warning "incompatible implicit" } */
- /* { dg-message "include ..time.h.." "" { target *-*-* } 275 } */
+ /* { dg-message "include ..time.h.." "" { target *-*-* } .-1 } */
}
_Atomic int
main (_Atomic int argc, _Atomic char **argv)
-/* { dg-warning "qualified return type" "return" { target *-*-* } 6 } */
-/* { dg-warning "qualified parameter type\[^\n\]*int" "parameter" { target *-*-* } 6 } */
-/* { dg-warning "qualified parameter type\[^\n\]*char" "parameter" { target *-*-* } 6 } */
+/* { dg-warning "qualified return type" "return" { target *-*-* } .-1 } */
+/* { dg-warning "qualified parameter type\[^\n\]*int" "parameter" { target *-*-* } .-2 } */
+/* { dg-warning "qualified parameter type\[^\n\]*char" "parameter" { target *-*-* } .-3 } */
{
return 0;
}
int a7[] = a7; /* { dg-error "12:invalid initializer" } */
struct S s = { { 1 }, { 3 } }; /* { dg-error "23:extra brace group at end of initializer" } */
-/* { dg-warning "23:excess elements in struct initializer" "" { target *-*-* } 34 } */
+/* { dg-warning "23:excess elements in struct initializer" "" { target *-*-* } .-1 } */
struct g g1 = { {0, { 1 } } }; /* { dg-error "21:initialization of flexible array member in a nested context" } */
struct g g2 = { .f[0] = 1 }; /* { dg-error "20:array index in non-array initializer" } */
/* Test that we don't output the warning twice. */
inline int foo (void); /* { dg-bogus "inline function.*inline function" } */
-/* { dg-warning "inline function .foo. declared but never defined" "" { target *-*-* } 7 } */
+/* { dg-warning "inline function .foo. declared but never defined" "" { target *-*-* } .-1 } */
foo (void)
{
printf ("%d\n", 0UL); /* { dg-bogus "expects argument of type.*expects argument of type" } */
- /* { dg-warning "expects argument of type" "" { target *-*-* } 10 } */
+ /* { dg-warning "expects argument of type" "" { target *-*-* } .-1 } */
}
foo (void)
{
myprintf ("%d\n", 0UL); /* { dg-bogus "expects argument of type.*expects argument of type" } */
- /* { dg-warning "expects argument of type" "" { target *-*-* } 11 } */
+ /* { dg-warning "expects argument of type" "" { target *-*-* } .-1 } */
}
void switch_to_stack (my_stack *stack){
asm ( /* { dg-error "impossible constraint" } */
-/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } 14 } */
+/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } .-1 } */
"\n"
: "+r" (stack->regs)
);
foo(void)
{
bar /* { dg-error "undeclared" } */
- /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } 9 } */
+ /* { dg-message "undeclared identifier is reported only once" "reminder" { target *-*-* } .-1 } */
;
}
struct s4 { short f1; int f2; };
#pragma options align=natural foo /* { dg-warning "junk at end of '#pragma options'" } */
-/* { dg-warning "malformed '#pragma options align={mac68k|power|reset}', ignoring" "ignoring" { target *-*-* } 34 } */
+/* { dg-warning "malformed '#pragma options align={mac68k|power|reset}', ignoring" "ignoring" { target *-*-* } .-1 } */
/* Segment pragmas don't do anything anymore. */
/* { dg-do compile } */
#pragma GCC diagnostic /* { dg-warning "missing" "missing" } */
-/* { dg-warning "24:missing" "wrong column" { xfail *-*-* } 2 } */
+/* { dg-warning "24:missing" "wrong column" { xfail *-*-* } .-1 } */
#pragma GCC diagnostic warn /* { dg-warning "24:expected" } */
matching dg-message), dejagnu will report these as excess errors. */
#pragma message "
-/* { dg-error "17:missing terminating" "" { target *-*-* } 18 } */
-/* { dg-warning "expected a string" "" { target *-*-* } 18 } */
+/* { dg-error "17:missing terminating" "" { target *-*-* } .-1 } */
+/* { dg-warning "expected a string" "" { target *-*-* } .-2 } */
#pragma message "Bad 1
-/* { dg-error "17:missing terminating" "" { target *-*-* } 21 } */
-/* { dg-warning "expected a string" "" { target *-*-* } 21 } */
+/* { dg-error "17:missing terminating" "" { target *-*-* } .-1 } */
+/* { dg-warning "expected a string" "" { target *-*-* } .-2 } */
#pragma message ("Bad 2
-/* { dg-error "18:missing terminating" "" { target *-*-* } 24 } */
-/* { dg-warning "expected a string" "" { target *-*-* } 24 } */
+/* { dg-error "18:missing terminating" "" { target *-*-* } .-1 } */
+/* { dg-warning "expected a string" "" { target *-*-* } .-2 } */
#pragma message ("Bad 3"
-/* { dg-warning "malformed '#pragma message" "" { target *-*-* } 27 } */
+/* { dg-warning "malformed '#pragma message" "" { target *-*-* } .-1 } */
#pragma message "" junk
-/* { dg-warning "junk at end of '#pragma message'" "" { target *-*-* } 30 } */
+/* { dg-warning "junk at end of '#pragma message'" "" { target *-*-* } .-1 } */
#pragma message ("") junk
-/* { dg-warning "junk at end of '#pragma message'" "" { target *-*-* } 33 } */
+/* { dg-warning "junk at end of '#pragma message'" "" { target *-*-* } .-1 } */
#pragma message "" /* No output expected for empty messages. */
#pragma message ("")
void prime5(void)
{
extern double bar5(double); /* { dg-message "note: previous declaration" "previous 1" } */
-} /* { dg-message "note: previous implicit declaration" "previous 2" { target *-*-* } 68 } */
+} /* { dg-message "note: previous implicit declaration" "previous 2" { target *-*-* } .-1 } */
void test5(void)
{
bar5(1); /* { dg-warning "implicit declaration of function" } */
-} /* { dg-error "incompatible implicit declaration" "" { target *-*-* } 73 } */
+} /* { dg-error "incompatible implicit declaration" "" { target *-*-* } .-1 } */
/* Extern then static, both at file scope. */
void prime8(void)
{
test8(); /* { dg-message "note: previous" "" } */
- /* { dg-warning "implicit" "implicit" { target *-*-* } 97 } */
+ /* { dg-warning "implicit" "implicit" { target *-*-* } .-1 } */
}
static int test8(int x) /* { dg-error "follows non-static" } */
/* Different signed SIMD assignment. */
f = a; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
- /* { dg-error "incompatible types when assigning" "" { target *-*-* } 35 } */
+ /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-1 } */
/* Casted different signed SIMD assignment. */
f = (uv4si) a;
#define vector __attribute__ ((vector_size (8)))
vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */
vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
- /* { dg-error "incompatible types when initializing" "" { target *-*-* } 7 } */
+ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */
#define vector __attribute__ ((vector_size (8)))
vector char x = (vector char) {1,2,3,4,5,6,7,8}; /* { dg-bogus "initializer" } */
vector char y = (vector short) {1,2,3,4}; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
- /* { dg-error "incompatible types when initializing" "" { target *-*-* } 7 } */
+ /* { dg-error "incompatible types when initializing" "" { target *-*-* } .-1 } */
int test5 (struct foo *ptr)
{
return ptr->this_is_unlike_any_of_the_fields; /* { dg-bogus "did you mean" } */
- /* { dg-error "has no member named" "" { target *-*-* } 40 } */
+ /* { dg-error "has no member named" "" { target *-*-* } .-1 } */
}
union u
/* Verify that gcc doesn't offer nonsensical suggestions. */
nonsensical_suggestion_t var; /* { dg-bogus "did you mean" } */
-/* { dg-error "unknown type name" "" { target { *-*-* } } 56 } */
+/* { dg-error "unknown type name" "" { target { *-*-* } } .-1 } */
/* { dg-begin-multiline-output "" }
nonsensical_suggestion_t var;
^~~~~~~~~~~~~~~~~~~~~~~~
/* { dg-options "-pedantic" } */
struct s0 { ; }; /* { dg-warning "extra semicolon in struct or union specified" } */
-/* { dg-warning "struct has no members" "empty" { target *-*-* } 7 } */
+/* { dg-warning "struct has no members" "empty" { target *-*-* } .-1 } */
struct s1 {
int a;
; /* { dg-warning "extra semicolon in struct or union specified" } */
/* { dg-options "-pedantic-errors" } */
struct s0 { ; }; /* { dg-error "extra semicolon in struct or union specified" } */
-/* { dg-error "struct has no members" "empty" { target *-*-* } 7 } */
+/* { dg-error "struct has no members" "empty" { target *-*-* } .-1 } */
struct s1 {
int a;
; /* { dg-error "extra semicolon in struct or union specified" } */
enum e { A };
union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
-/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 9 } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "not anything" } */
-/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 11 } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
-/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 14 } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "no anything" } */
-/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } 16 } */
+/* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
union __attribute__((__transparent_union__)) u1 { };
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 19 } */
+/* { dg-warning "union cannot be made transparent" "" { target *-*-* } .-1 } */
union u2 { } __attribute__((__transparent_union__));
-/* { dg-warning "union cannot be made transparent" "" { target *-*-* } 21 } */
+/* { dg-warning "union cannot be made transparent" "" { target *-*-* } .-1 } */
void g (static int \u00e9); /* { dg-error "storage class specified for parameter '\\\\U000000e9'" } */
struct s2 { int \u00e1; } \u00e9 = { { 0 } }; /* { dg-warning "braces around scalar initializer" } */
-/* { dg-message "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } 15 } */
+/* { dg-message "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } .-1 } */
int
foo (int i)
{
- int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } 9 } */
+ int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } . } */
if (bar (i)) {
baz (&j);
int
foo (int i)
{
- int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } 8 } */
+ int j; /* { dg-warning "'j' may be used uninitialized in this function" "uninitialized" { xfail *-*-* } . } */
if (bar (i)) {
baz (&j);
int j;
if (1 == i)
- return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } 10 } */
+ return j; /* { dg-bogus "uninitialized" "uninitialized" { xfail *-*-* } . } */
return 0;
}
int j;
if (1 == i)
- return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } 21 } */
+ return j; /* { dg-warning "uninitialized" "uninitialized" { target *-*-* } . } */
return 0;
}
/* { dg-options "-std=gnu89" } */
const unsigned short c0 = u'a'; /* { dg-error "undeclared" "undeclared" } */
- /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 6 } */
+ /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } .-1 } */
const unsigned long c1 = U'a'; /* { dg-error "undeclared" "undeclared" } */
- /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 8 } */
+ /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } .-1 } */
#define u 1 +
#define U 2 +
/* { dg-options "-std=gnu89" } */
const void *s0 = u8"a"; /* { dg-error "undeclared" "undeclared" } */
- /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } 5 } */
+ /* { dg-error "expected ',' or ';'" "expected" { target *-*-* } .-1 } */
#define u8 "a"
char16_t c6 = U'\U00064321'; /* { dg-warning "implicitly truncated" } */
char16_t c7 = L'a';
char16_t c8 = L'\u2029';
-char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } 18 } */
- /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } 18 } */
+char16_t c9 = L'\U00064321'; /* { dg-warning "implicitly truncated" "" { target { 4byte_wchar_t } } . } */
+ /* { dg-warning "constant too long" "" { target { ! 4byte_wchar_t } } .-1 } */
int main () {}
void foo11a(int x[sizeof(int *(*)[*])]); /* { dg-warning "not in a declaration" } */
void foo11b(__SIZE_TYPE__ x, int y[(__UINTPTR_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */
void foo11c(struct s { int (*x)[*]; } *y); /* { dg-error "a member of a structure or union cannot have a variably modified type" "variably modified" } */
-/* { dg-warning "'struct s' declared inside parameter list" "struct decl" { target *-*-* } 11 } */
+/* { dg-warning "'struct s' declared inside parameter list" "struct decl" { target *-*-* } .-1 } */
constant expression if not evaluated. */
void foo11e(int x[1 ? 0 : sizeof(int *[*])]); /* { dg-warning "not in a declaration" } */
-/* { dg-error "zero-size array" "correct zero size" { target *-*-* } 11 } */
+/* { dg-error "zero-size array" "correct zero size" { target *-*-* } .-1 } */
foo (void)
{
int x[a] = { 1 }; /* { dg-error "variable-sized object may not be initialized" "VLA init" } */
- /* { dg-warning "excess elements in array initializer" "excess" { target *-*-* } 12 } */
- /* { dg-message "near initialization" "near" { target *-*-* } 12 } */
+ /* { dg-warning "excess elements in array initializer" "excess" { target *-*-* } .-1 } */
+ /* { dg-message "near initialization" "near" { target *-*-* } .-2 } */
}
const int i = 1;
void foo() { char a[][i] = {""}; } /* { dg-error "variable-sized object may not be initialized" } */
-/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } 9 } */
+/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } .-1 } */
/* { dg-options "" } */
void foo(int i) { char a[][i] = {""}; } /* { dg-error "variable-sized object may not be initialized" } */
-/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } 8 } */
+/* { dg-error "array size missing in 'a'" "extra error" { target *-*-* } .-1 } */
extern void * foo (void);
void * foo (void) { return (void *)foo; }
-/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } .-1 } */
#pragma weak foo
extern void * foo (void);
void * foo (void) { return (void *)foo; }
-/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } .-1 } */
extern void * foo (void) __attribute__((weak));
/* But this one should, since it doesn't fit in long (long), but
does fit in unsigned long (long). */
i = 18446744073709551615; /* { dg-warning "integer constant is so large that it is unsigned" "so large" } */
- /* { dg-warning "this decimal constant would be unsigned in ISO C90" "ISO C90" { target *-*-* } 28 } */
+ /* { dg-warning "this decimal constant would be unsigned in ISO C90" "ISO C90" { target *-*-* } .-1 } */
# 29 "sys-header.h" 3
}
typedef int int32x2_t __attribute__ ((__vector_size__ ((8))));
-/* { dg-error "'-mgeneral-regs-only' is incompatible with vector return type" "" {target "aarch64*-*-*"} 7 } */
-/* { dg-error "'-mgeneral-regs-only' is incompatible with vector argument" "" {target "aarch64*-*-*"} 7 } */
+/* { dg-error "'-mgeneral-regs-only' is incompatible with vector return type" "" {target "aarch64*-*-*"} .+2 } */
+/* { dg-error "'-mgeneral-regs-only' is incompatible with vector argument" "" {target "aarch64*-*-*"} .+1 } */
int32x2_t test (int32x2_t a, int32x2_t b)
{
return a + b;
poly16x8_t v128_16;
s64_8 (v64_8); /* { dg-message "use -flax-vector-conversions" } */
- /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } 31 } */
+ /* { dg-error "incompatible type for argument 1 of 's64_8'" "" { target *-*-* } .-1 } */
u64_8 (v64_8); /* { dg-error "incompatible type for argument 1 of 'u64_8'" } */
p64_8 (v64_8);
/* { dg-do compile } */
__attribute__((target ("arch=hasvel"))) void foo (void) {} /* { dg-error "bad value .'hasvel'. for 'target..arch=..' attribute" } */
-/* { dg-message "valid arguments to 'target..arch=..' attribute are: \[^\n\r]*; did you mean 'haswell'?" "" { target *-*-* } 6 } */
+/* { dg-message "valid arguments to 'target..arch=..' attribute are: \[^\n\r]*; did you mean 'haswell'?" "" { target *-*-* } .-1 } */
/* Just because this is a V2SI, it doesn't make it an opaque. */
vint = vshort; /* { dg-message "note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts" } */
- /* { dg-error "incompatible types when assigning" "" { target *-*-* } 22 } */
+ /* { dg-error "incompatible types when assigning" "" { target *-*-* } .-1 } */
return 0;
}
double r;
asm ("mov %S1,%S0; mov %R1,%R0" : "=r" (r) : "i" (f));
-/* { dg-error "invalid operand to %S" "" {target "sh*-*-*" } 9 } */
-/* { dg-error "invalid operand to %R" "" {target "sh*-*-*" } 9 } */
+/* { dg-error "invalid operand to %S" "" {target "sh*-*-*" } .-1 } */
+/* { dg-error "invalid operand to %R" "" {target "sh*-*-*" } .-2 } */
return r;
}
int main (int argc, char *argv[])
{
+;
- /* { dg-error "expected expression" "error test" { xfail *-*-* } 7 } */
+ /* { dg-error "expected expression" "error test" { xfail *-*-* } .-1 } */
return 0;
}
/* { dg-excess-errors "expect failure" { xfail *-*-* } } */
integer :: a = 42
type t
character (a) :: arr (1) = [ "a" ]
- ! { dg-error "in the expression" "" { target *-*-* } 11 }
- ! { dg-error "specification expression" "" { target *-*-* } 11 }
+ ! { dg-error "in the expression" "" { target *-*-* } .-1 }
+ ! { dg-error "specification expression" "" { target *-*-* } .-2 }
end type t
end
type, bind(C):: t3
class(t), pointer :: y
- ! { dg-error "Polymorphic component y at .1. in SEQUENCE or BIND" "" { target *-*-* } 17 }
+ ! { dg-error "Polymorphic component y at .1. in SEQUENCE or BIND" "" { target *-*-* } .-1 }
end type t3
end
!$acc parallel copy(a(:))
!$acc end parallel
!$acc parallel copy(a(2:3,2:3))
- ! { dg-error "Rank mismatch" "" { target *-*-* } 16 }
- ! { dg-error "'a' in MAP clause" "" { target *-*-* } 16 }
+ ! { dg-error "Rank mismatch" "" { target *-*-* } .-1 }
+ ! { dg-error "'a' in MAP clause" "" { target *-*-* } .-2 }
!$acc end parallel
!$acc parallel copy (a(:11)) ! { dg-warning "Upper array reference" }
!$acc end parallel
!$acc end parallel
!$acc parallel copy (a(:b))
- ! { dg-error "Array index" "" { target *-*-* } 25 }
- ! { dg-error "'a' in MAP clause" "" { target *-*-* } 25 }
+ ! { dg-error "Array index" "" { target *-*-* } .-1 }
+ ! { dg-error "'a' in MAP clause" "" { target *-*-* } .-2 }
!$acc end parallel
!$acc parallel copy (b(1:3,2:4))
!$acc end parallel
!$acc parallel copy (b(2:3))
- ! { dg-error "Rank mismatch" "" { target *-*-* } 32 }
- ! { dg-error "'b' in MAP clause" "" { target *-*-* } 32 }
+ ! { dg-error "Rank mismatch" "" { target *-*-* } .-1 }
+ ! { dg-error "'b' in MAP clause" "" { target *-*-* } .-2 }
!$acc end parallel
!$acc parallel copy (b(1:, 4:6))
!$acc end parallel
! Incorrect: common block C cannot be declared both
! shared and private
!$OMP PARALLEL PRIVATE (/C/), SHARED(/C/)
- ! { dg-error "Symbol 'y' present" "" { target *-*-* } 7 }
- ! { dg-error "Symbol 'x' present" "" { target *-*-* } 7 }
+ ! { dg-error "Symbol 'y' present" "" { target *-*-* } .-1 }
+ ! { dg-error "Symbol 'x' present" "" { target *-*-* } .-2 }
! do work here
!$OMP END PARALLEL
END SUBROUTINE A23_5_WRONG
! - Z is listed in SHARED clause
X=1 ! O.K. - X is THREADPRIVATE
Z(I) = Y ! Error - cannot reference I or Y here
-! { dg-error "'i' not specified" "" { target *-*-* } 20 } */
+! { dg-error "'i' not specified" "" { target *-*-* } .-1 } */
! { dg-error "enclosing 'parallel'" "" { target *-*-* } 14 } */
! { dg-error "'y' not specified" "" { target *-*-* } 20 } */
!$OMP DO firstprivate(y)
SUBROUTINE specification_expression
CHARACTER(KIND=selected_char_kind("ascii")) :: x
-! { dg-error "must be an intrinsic function" "" { target "*-*-*" } 38 }
-! { dg-warning "Fortran 2003" "" { target "*-*-*" } 38 }
+! { dg-error "must be an intrinsic function" "" { target "*-*-*" } .-1 }
+! { dg-warning "Fortran 2003" "" { target "*-*-*" } .-2 }
END SUBROUTINE specification_expression
SUBROUTINE intrinsic_decl
! { dg-do compile }
program test
- print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } 3 }
- print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } 4 }
+ print 1, 'string 1' ! { dg-error "FORMAT label 1" " " { target *-*-* } . }
+ print 1, 'string 2' ! { dg-error "FORMAT label 1" " " { target *-*-* } . }
!1 format(a)
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } 6 }
- goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } 7 }
+ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } . }
+ goto 2 ! { dg-error "Label 2 referenced" " " { target *-*-* } . }
!2 continue
end program
! { dg-options "-std=f95 -fdiagnostics-show-option" }
#warning "Printed"
-! { dg-warning "\"Printed\" .-Wcpp." "" { target *-*-* } 4 }
+! { dg-warning "\"Printed\" .-Wcpp." "" { target *-*-* } .-1 }
! { dg-options "-std=f95 -fdiagnostics-show-option -Werror=cpp" }
! { dg-message "some warnings being treated as errors" "" { target *-*-* } 0 }
#warning "Printed"
-! { dg-error "\"Printed\" .-Werror=cpp." "" { target *-*-* } 4 }
+! { dg-error "\"Printed\" .-Werror=cpp." "" { target *-*-* } .-1 }
! { dg-options "-std=f95 -fdiagnostics-show-option -Werror -Wno-error=cpp" }
#warning "Printed"
-! { dg-warning "\"Printed\" .-Wcpp." "" { target *-*-* } 4 }
+! { dg-warning "\"Printed\" .-Wcpp." "" { target *-*-* } .-1 }
! { dg-options "-std=f95 -fdiagnostics-show-option -Wno-cpp" }
#warning "Not printed"
-! { dg-bogus "." "" { target *-*-* } 4 }
+! { dg-bogus "." "" { target *-*-* } .-1 }
+ (id) method1
{
return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 20 } */
+} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } .-1 } */
- (id) method2
{
return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 24 } */
+} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } .-1 } */
+ (id) method3
{
abort ();
return 20;
}
@end /* { dg-warning "incomplete implementation of class .MyObject." } */
- /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 29 } */
+ /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } .-1 } */
@implementation MyObject
@end /* { dg-warning "incomplete implementation of class .MyObject." } */
- /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 24 } */
- /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 24 } */
+ /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
@implementation MyObject2
@end /* { dg-warning "incomplete implementation of class .MyObject2." } */
- /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 50 } */
- /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */
- /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } 50 } */
+ /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
+ /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } .-3 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-4 } */
+ /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } .-5 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } .-6 } */
[cls doItInstance7]; /* { dg-warning "no .\\+doItInstance7. method found" } */
[clsP7 doItClass7]; /* { dg-warning "not found in protocol" } */
- /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } 189 } */
+ /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } .-1 } */
[clsP7 doItInstance7]; /* { dg-warning "not found in protocol" } */
- /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } 191 } */
+ /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } .-1 } */
[MyClass1 doItClass7]; /* { dg-warning "may not respond" } */
[MyClass1 doItInstance7]; /* { dg-warning "may not respond" } */
@interface Manip : TestsuiteObject {
int c;
cxx_struct s; // { dg-warning "user-defined destructor" }
- // { dg-warning "constructors and destructors will not be invoked" "" { target *-*-* } 22 }
+ // { dg-warning "constructors and destructors will not be invoked" "" { target *-*-* } .-1 }
}
- (void) manipulate_ivars;
@end
return [self test];
}
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 29 } */
-/* { dg-warning "not found" "" { target *-*-* } 29 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-warning "not found" "" { target *-*-* } .-2 } */
@try { @throw object; }
@catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
- { /* { dg-error "no matching function" "" { target *-*-* } 72 } */
+ { /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
} /* { dg-message "candidate" "" { target *-*-* } 13 } */
@try { @throw object; }
@try { @throw object; }
@catch
{ /* { dg-error "expected" } */
- dummy++; /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } 35 } */
+ dummy++; /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
}
@catch () /* { dg-error "expected identifier before" } */
- { /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } 38 } */
+ { /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
dummy++;
}
@catch (i) /* { dg-error ".i. has not been declared" } */
- { /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } 42 } */
+ { /* { dg-error "@catch parameter is not a known Objective-C class type" "" { target *-*-* } .-1 } */
dummy++;
}
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
- { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } 46 } */
+ { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++;
}
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
@try { @throw object; }
@catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
- { /* { dg-error "no matching function" "" { target *-*-* } 72 } */
+ { /* { dg-error "no matching function" "" { target *-*-* } .-1 } */
dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
} /* { dg-message "candidate" "" { target *-*-* } 13 } */
{
s1 (@"this format not checked %d %s", 3, 4);
printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format '%s' expects argument of type 'char.', but argument 3 has type 'int'" } */
- /* { dg-warning "too many arguments for format" "" { target *-*-* } 48 } */
+ /* { dg-warning "too many arguments for format" "" { target *-*-* } .-1 } */
printf(s9 (1, (char *)"and so is this %d %d %s" , 3, 4, "hm"), 5, 6, 12); /* { dg-warning "format '%s' expects argument of type 'char.', but argument 4 has type 'int'" } */
}
a->v2 = 1;
a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */
a->v4 = a->v3 - 1; /* { dg-warning ".v4. is @private" } */
- /* { dg-warning ".v3. is @protected" "" { target *-*-* } 35 } */
+ /* { dg-warning ".v3. is @protected" "" { target *-*-* } . } */
}
AClass <MyProtocol> *object1; /* This is fine. */
Integer <MyProtocol> *object2; /* { dg-error ".Integer {aka int}. is not a template" } */
-/* { dg-error ".MyProtocol. was not declared in this scope" "" { target *-*-* } 21 } */
+/* { dg-error ".MyProtocol. was not declared in this scope" "" { target *-*-* } .-1 } */
Integer <NonExistingProtocol> *object3; /* { dg-error ".Integer {aka int}. is not a template" } */
-/* { dg-error ".NonExistingProtocol. was not declared in this scope" "" { target *-*-* } 24 } */
+/* { dg-error ".NonExistingProtocol. was not declared in this scope" "" { target *-*-* } .-1 } */
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}
TestsuiteObject *obj = [[TestsuiteObject alloc] init];
id obj2 = obj;
[obj setWindow:nil]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 18 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 8 } */
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data
{
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
- /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */
+ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } 9 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
void foo(void) {
id obj1, obj2 = 0;
obj2 = [obj1 initWithData: obj2];
- /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 26 } */
+ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */
void foo(NotKnown *n) {
[NotKnown new]; /* { dg-warning ".interface of class .NotKnown. not found" } */
[n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 12 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
void foo(UnderSpecified *u, NotAClass *n) {
[n nonexistent_method]; /* { dg-warning "invalid receiver type" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 11 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
[NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
[u nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 14 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
[UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
- /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } 16 } */
+ /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } .-1 } */
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
@property (xxx) int g; /* { dg-error "unknown property attribute" } */
@property (readonly,xxx) int h; /* { dg-error "unknown property attribute" } */
@property ( int i; /* { dg-error "expected identifier" } */
- /* { dg-error "expected ... " "" { target *-*-* } 18 } */
+ /* { dg-error "expected ... " "" { target *-*-* } .-1 } */
@end
/* Test the warnings on 'assign'. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 12 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property (readonly) id property_b; /* No 'assign' warning (assign semantics do not matter if the property is readonly). */
@property id *property_c; /* No 'assign' warning (the type is not an Objective-C object). */
@property Class property_d; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */
@property MyRootClass *property_e; /* { dg-warning "object property .property.e. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 18 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@end
@implementation MyClass3 (count3)
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setCount3:. not found" "" { target *-*-* } 97 } */
+/* { dg-warning "method definition for .-setCount3:. not found" "" { target *-*-* } .-1 } */
/* Test the warnings on 'assign' with protocols. */
@property id <MyProtocol> property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 16 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property MyRootClass <MyProtocol> *property_b; /* { dg-warning "object property .property.b. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 19 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property Class <MyProtocol> property_c; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */
@end
/* Test various error messages. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 20 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property int property_b = 4; /* { dg-error "expected" } */
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */
@property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
MyRootClass.int; /* { dg-error "expected identifier" } */
if (MyRootClass.int) /* { dg-error "expected identifier" } */
- /* { dg-error "expected" "" { target *-*-* } 39 } */
+ /* { dg-error "expected" "" { target *-*-* } .-1 } */
abort ();
return 0;
return self.b;
}
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setB:. not found" "" { target *-*-* } 48 } */
+/* { dg-warning "method definition for .-setB:. not found" "" { target *-*-* } .-1 } */
return 0;
}
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setA:. not found" "" { target *-*-* } 43 } */
-/* { dg-warning "class .MyClass2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 43 } */
+/* { dg-warning "method definition for .-setA:. not found" "" { target *-*-* } .-1 } */
+/* { dg-warning "class .MyClass2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
@implementation Bar
@end /* { dg-warning "incomplete implementation of class .Bar." } */
- /* { dg-warning "method definition for .-setFooBar:. not found" "" { target *-*-* } 11 } */
- /* { dg-warning "method definition for .-fooBar. not found" "" { target *-*-* } 11 } */
+ /* { dg-warning "method definition for .-setFooBar:. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "method definition for .-fooBar. not found" "" { target *-*-* } .-2 } */
int iVar;
}
@property int FooBar /* { dg-error "expected ';' at end of input" } */
- /* { dg-error "expected '@end' at end of input" "" { target *-*-* } 8 } */
+ /* { dg-error "expected '@end' at end of input" "" { target *-*-* } .-1 } */
@synthesize countA; /* { dg-error ".atomic. property .countA. is using bit-field instance variable .countA." } */
@synthesize countB; /* { dg-error "property .countB. is using instance variable .countB. of incompatible type" } */
@end /* { dg-warning "incomplete implementation of class" } */
-/* { dg-message "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */
-/* { dg-message "method definition for ..countA. not found" "" { target *-*-* } 29 } */
+/* { dg-message "method definition for ..setCountA.. not found" "" { target *-*-* } .-1 } */
+/* { dg-message "method definition for ..countA. not found" "" { target *-*-* } .-2 } */
@implementation Test
@synthesize v1; /* { dg-error "must be an existing ivar" } */
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 15 } */
-/* { dg-warning "method definition for .-setV1:. not found" "" { target *-*-* } 15 } */
-/* { dg-warning "method definition for .-v1. not found" "" { target *-*-* } 15 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-warning "method definition for .-setV1:. not found" "" { target *-*-* } .-2 } */
+/* { dg-warning "method definition for .-v1. not found" "" { target *-*-* } .-3 } */
@implementation Test2
@synthesize w1; /* { dg-error "ivar .w1. used by .@synthesize. declaration must be an existing ivar" } */
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 27 } */
-/* { dg-message "method definition for .-setW1:. not found" "" { target *-*-* } 27 } */
-/* { dg-message "method definition for .-w1. not found" "" { target *-*-* } 27 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-message "method definition for .-setW1:. not found" "" { target *-*-* } .-2 } */
+/* { dg-message "method definition for .-w1. not found" "" { target *-*-* } .-3 } */
receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .long int." } */
receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-error "invalid conversion" "" { target *-*-* } 28 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
receiver += [(Obj *)receiver anotherValue];
receiver += [(Obj <Proto> *)receiver someValue];
receiver += [(Obj <Proto> *)receiver anotherValue];
receiver += [objrcvr someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-error "invalid conversion" "" { target *-*-* } 34 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
receiver += [objrcvr anotherValue];
receiver += [(Obj <Proto> *)objrcvr someValue];
receiver += [objrcvr2 someValue];
receiver += [objrcvr2 anotherValue];
receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-error "invalid conversion" "" { target *-*-* } 42 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
receiver += [(Obj *)objrcvr2 anotherValue];
{
[object1 method]; /* Ok */
[object2 method]; /* { dg-warning ".MyClass. may not respond to ..method." } */
- /* { dg-warning "without a matching method" "" { target *-*-* } 27 } */
- /* { dg-warning "will be assumed to return" "" { target *-*-* } 27 } */
- /* { dg-warning "as arguments" "" { target *-*-* } 27 } */
+ /* { dg-warning "without a matching method" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return" "" { target *-*-* } .-2 } */
+ /* { dg-warning "as arguments" "" { target *-*-* } .-3 } */
}
id test_invalid8 = @"te" @@"s" @"t"; /* { dg-error "repeated .@. before Objective-C string" } */
id test_invalid9 = @"te" @"s" @"t" @; /* { dg-error "stray .@. in program" } */
id test_invalidA = @"te" @ st; /* { dg-error "stray .@. in program" } */
- /* { dg-error "expected" "" { target *-*-* } 31 } */
+ /* { dg-error "expected" "" { target *-*-* } .-1 } */
+ (int) test_func
{
return [super test_func]; /* { dg-bogus "invalid use of undefined type" } */
-} /* { dg-bogus "forward declaration of" "" { target *-*-* } 28 } */
+} /* { dg-bogus "forward declaration of" "" { target *-*-* } .-1 } */
@end
NSButton * mCopyAcrobatCB;
[ [ mCopyAcrobatCB state ] == 0 ] != 1; /* { dg-error "expected identifier before ... token" } */
-/* { dg-error "expected \\\'\\\{\\\' before \\\'!=\\\' token" "" { target *-*-* } 11 } */
-/* { dg-error "lambda expressions only available with" "" { target *-*-* } 11 } */
-/* { dg-error "no match for \\\'operator!=\\\' in" "" { target *-*-* } 11 } */
+/* { dg-error "expected \\\'\\\{\\\' before \\\'!=\\\' token" "" { target *-*-* } .-1 } */
+/* { dg-error "lambda expressions only available with" "" { target *-*-* } .-2 } */
+/* { dg-error "no match for \\\'operator!=\\\' in" "" { target *-*-* } .-3 } */
}
{
}
@end /* { dg-warning "incomplete implementation of class" } */
-/* { dg-warning "method definition for ..someMethod. not found" "" { target *-*-* } 12 } */
+/* { dg-warning "method definition for ..someMethod. not found" "" { target *-*-* } .-1 } */
@implementation SaturnDoc /* { dg-warning "cannot find interface declaration" } */
- read: (void*)aStream ggg /* { dg-error "expected .:. at end of input" } */
-/* { dg-error "expected ..end. at end of input" "" { target *-*-* } 2 } */
\ No newline at end of file
+/* { dg-error "expected ..end. at end of input" "" { target *-*-* } .-1 } */
\ No newline at end of file
typeof(i) j = 6;
typeof(q) k = 66;
some_func (&j);
-/* { dg-error "invalid conversion" "" { target *-*-* } 23 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
/* { dg-message "initializing argument" "" { target *-*-* } 12 } */
some_func (&k);
}
typeof(q) k = 77;
some_func (&k);
some_func (&j);
-/* { dg-error "invalid conversion" "" { target *-*-* } 38 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
/* The following is disabled as it is already checked above and the testsuites seems
to count multiple different identical errors on the same line only once */
/* dg-message "initializing argument" "" { target *-*-* } 12 */
typeof(q) k = 88;
typeof(i) j = 8;
some_func (&j);
-/* { dg-error "invalid conversion" "" { target *-*-* } 53 } */
+/* { dg-error "invalid conversion" "" { target *-*-* } .-1 } */
/* The following is disabled as it is already checked above and the testsuites seems
to count multiple different identical errors on the same line only once */
/* dg-message "initializing argument" "" { target *-*-* } 12 */
+ (id) method1
{
return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 20 } */
+} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } .-1 } */
- (id) method2
{
return self; /* { dg-warning "function declared .noreturn. has a .return. statement" } */
-} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } 24 } */
+} /* { dg-warning ".noreturn. function does return" "" { target *-*-* } .-1 } */
+ (id) method3
{
abort ();
[(struct {int a;} *)ip foo]; /* { dg-warning "invalid receiver type" } */
[func1 foo]; /* { dg-warning "invalid receiver type" } */
[struct1.a foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-warning "cast to pointer from integer" "" { target *-*-* } 28 } */
+ /* { dg-warning "cast to pointer from integer" "" { target *-*-* } .-1 } */
[union1.a foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-warning "cast to pointer from integer" "" { target *-*-* } 30 } */
+ /* { dg-warning "cast to pointer from integer" "" { target *-*-* } .-1 } */
[struct1 foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-error "cannot convert" "" { target *-*-* } 32 } */
+ /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
[union1 foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-error "cannot convert" "" { target *-*-* } 34 } */
+ /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
[struct2 foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-error "cannot convert" "" { target *-*-* } 36 } */
+ /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
[union2 foo]; /* { dg-warning "invalid receiver type" } */
- /* { dg-error "cannot convert" "" { target *-*-* } 38 } */
+ /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
[f foo]; /* { dg-warning "invalid receiver type" } */
}
void baz()
{
[foo test]; /* { dg-warning "invalid receiver type" } */
- /* { dg-error "cannot convert to a pointer type" "" { target *-*-* } 13 } */
+ /* { dg-error "cannot convert to a pointer type" "" { target *-*-* } .-1 } */
}
int i = (size_t)[self instance_func0]; /* { dg-warning ".Derived. may not respond to .\\-instance_func0." } */
i += [(Derived <Func> *)self categ_instance_func2];
i += (size_t)[(TestsuiteObject <Func> *)self categ_instance_func2]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-categ_instance_func2." } */
- /* { dg-warning ".\\-categ_instance_func2. not found in protocol" "" { target *-*-* } 132 } */
+ /* { dg-warning ".\\-categ_instance_func2. not found in protocol" "" { target *-*-* } .-1 } */
i += (size_t)[(id <Func>)self categ_instance_func2]; /* { dg-warning ".\\-categ_instance_func2. not found in protocol" } */
i += [(id)self categ_instance_func2];
return i + (size_t)[super instance_func0]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-instance_func0." } */
@end
@implementation class1 : supclass2 /* { dg-error "conflicting super class name" } */
-@end /* { dg-error "previous declaration" "" { target *-*-* } 13 } */
+@end /* { dg-error "previous declaration" "" { target *-*-* } .-1 } */
return 20;
}
@end /* { dg-warning "incomplete implementation of class .MyObject." } */
- /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 29 } */
+ /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } .-1 } */
@implementation MyObject
@end /* { dg-warning "incomplete implementation of class .MyObject." } */
- /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 24 } */
- /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 24 } */
+ /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
@implementation MyObject2
@end /* { dg-warning "incomplete implementation of class .MyObject2." } */
- /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 50 } */
- /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */
- /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 50 } */
- /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } 50 } */
+ /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
+ /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } .-3 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } .-4 } */
+ /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } .-5 } */
+ /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } .-6 } */
[cls doItInstance7]; /* { dg-warning "no .\\+doItInstance7. method found" } */
[clsP7 doItClass7]; /* { dg-warning "not found in protocol" } */
- /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } 189 } */
+ /* { dg-warning "no .\\+doItClass7. method found" "" { target *-*-* } .-1 } */
[clsP7 doItInstance7]; /* { dg-warning "not found in protocol" } */
- /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } 191 } */
+ /* { dg-warning "no .\\+doItInstance7. method found" "" { target *-*-* } .-1 } */
[MyClass1 doItClass7]; /* { dg-warning "may not respond" } */
[MyClass1 doItInstance7]; /* { dg-warning "may not respond" } */
[Cls meth1],
[2 + 1] = 3,
[2 * 2 ... 5] = (size_t)[0 meth4], /* { dg-warning "invalid receiver type" } */
- /* { dg-warning "no .\\-meth4. method found" "" { target *-*-* } 26 } */
+ /* { dg-warning "no .\\-meth4. method found" "" { target *-*-* } .-1 } */
[2] [Cls meth2],
/* Since invalid receivers are treated as 'id' for purposes of message
lookup, we _should_ find a meth2 to call below. */
return [self test];
}
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 29 } */
-/* { dg-warning "not found" "" { target *-*-* } 29 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-warning "not found" "" { target *-*-* } .-2 } */
@try { @throw object; }
@catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
- { /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } 72 } */
+ { /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } .-1 } */
dummy++;
}
dummy++;
}
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
- { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } 46 } */
+ { /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++;
}
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
@try { @throw object; }
@catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
- { /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } 72 } */
+ { /* { dg-error "conversion to non-scalar type requested" "" { target *-*-* } .-1 } */
dummy++;
}
;
for (12 in array) /* { dg-error "invalid iterating variable in fast enumeration" } */
- ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 50 } */
+ ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } .-1 } */
for (object in 12) /* { dg-error "collection in fast enumeration is not an object" } */
;
id object = nil;
for (typedef int my_typedef in array) /* { dg-error "declaration of non-variable" } */
- ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 42 } */
+ ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } .-1 } */
for (function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
- ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 45 } */
+ ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } .-1 } */
for (object_function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
;
{
s1 (@"format not checked %d %s", 3, 4);
printf("this one is checked %d %s", 3, 4, 5); /* { dg-warning "format '%s' expects argument of type 'char .', but argument 3 has type 'int'" } */
- /* { dg-warning "too many arguments for format" "" { target *-*-* } 41 } */
+ /* { dg-warning "too many arguments for format" "" { target *-*-* } .-1 } */
printf(s9 (1, "and so is this %d %d %s", 3, 4), 5, 6, 12); /* { dg-warning "format '%s' expects argument of type 'char .', but argument 4 has type 'int'" } */
}
a->v2 = 1;
a->v3 = [a value] - a->v2; /* { dg-warning ".v3. is @protected" } */
a->v4 = a->v3 - 1; /* { dg-warning ".v4. is @private" } */
- /* { dg-warning ".v3. is @protected" "" { target *-*-* } 34 } */
+ /* { dg-warning ".v3. is @protected" "" { target *-*-* } .-1 } */
}
Integer <MyProtocol> *object2; /* { dg-error "only Objective-C object types can be qualified with a protocol" } */
Integer <NonExistingProtocol> *object3; /* { dg-error "only Objective-C object types can be qualified with a protocol" } */
-/* { dg-error "cannot find protocol" "" { target *-*-* } 23 } */
+/* { dg-error "cannot find protocol" "" { target *-*-* } .-1 } */
void foo(void) {
id obj1, obj2 = 0;
obj2 = [obj1 initWithData: obj2];
- /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 25 } */
+ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
/* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 12 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 16 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 20 } */
void foo(NotKnown *n) {
[NotKnown new]; /* { dg-warning ".interface of class .NotKnown. not found" } */
[n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 12 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
[MyIntermediate rootInstanceMethod]; /* with the same name. */
[self instanceMethod]; /* { dg-warning ".MyDerived. may not respond to .\\+instanceMethod." } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
[MyDerived instanceMethod]; /* { dg-warning ".MyDerived. may not respond to .\\+instanceMethod." } */
}
@end
@ implementation NGActiveSocket
+ (void) socketPair:(int[m]) _pair {} /* { dg-error "" } */
- /* { dg-warning "" "" { target *-*-* } 7 } */
+ /* { dg-warning "" "" { target *-*-* } .-1 } */
@end
void foo(UnderSpecified *u, NotAClass *n) {
[n nonexistent_method]; /* { dg-warning "invalid receiver type" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 11 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
[NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
[u nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
- /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 14 } */
+ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } .-1 } */
[UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */
- /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } 16 } */
+ /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } .-1 } */
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
/* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 33 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 33 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 33 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}
TestsuiteObject *obj = [[TestsuiteObject alloc] init];
id obj2 = obj;
[obj setWindow:nil]; /* { dg-warning ".TestsuiteObject. may not respond to .\\-setWindow:." } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 20 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 20 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 20 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } .-2 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } .-3 } */
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
/* { dg-message "using .\\-\\(void\\)setWindow:\\(TestsuiteObject \\*\\)wdw." "" { target *-*-* } 10 } */
/* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data
{
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
- /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 35 } */
+ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } .-1 } */
/* { dg-message "using .\\-\\(id\\)initWithData:\\(TestsuiteObject \\*\\)data." "" { target *-*-* } 11 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 19 } */
/* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 15 } */
@end
@interface MyClass <UndefinedProtocol, DefinedProtocol>
-/* { dg-error "cannot find protocol declaration for .UndefinedProtocol." "" { target *-*-* } 12 } */
+/* { dg-error "cannot find protocol declaration for .UndefinedProtocol." "" { target *-*-* } .-1 } */
@end
@implementation MyClass
{
/* Private variables simply don't exist in the subclass. */
private = 12; /* { dg-error "instance variable" } */
- /* { dg-message "function it appears in" "" { target *-*-* } 37 } */
+ /* { dg-message "function it appears in" "" { target *-*-* } .-1 } */
protected = 12; /* Ok */
public = 12; /* Ok */
}
@property; /* { dg-error "expected" } */
@property int; /* { dg-error "expected identifier" } */
- /* { dg-warning "declaration does not declare anything" "" { target *-*-* } 10 } */
+ /* { dg-warning "declaration does not declare anything" "" { target *-*-* } .-1 } */
@property int a;
@property int b, c;
@property () int d; /* { dg-error "expected identifier" } */
/* Test the warnings on 'assign'. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 12 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property (readonly) id property_b; /* No 'assign' warning (assign semantics do not matter if the property is readonly). */
@property id *property_c; /* No 'assign' warning (the type is not an Objective-C object). */
@property Class property_d; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */
@property MyRootClass *property_e; /* { dg-warning "object property .property.e. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 18 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@end
@implementation MyClass3 (count3)
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setCount3:. not found" "" { target *-*-* } 97 } */
+/* { dg-warning "method definition for .-setCount3:. not found" "" { target *-*-* } .-1 } */
/* Test the warnings on 'assign' with protocols. */
@property id <MyProtocol> property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 16 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property MyRootClass <MyProtocol> *property_b; /* { dg-warning "object property .property.b. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 19 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property Class <MyProtocol> property_c; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */
@end
/* Test various error messages. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
- /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 20 } */
+ /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } .-1 } */
@property int property_b = 4; /* { dg-error "expected" } */
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */
@property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
return self.b;
}
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setB:. not found" "" { target *-*-* } 48 } */
+/* { dg-warning "method definition for .-setB:. not found" "" { target *-*-* } .-1 } */
return 0;
}
@end /* { dg-warning "incomplete implementation" } */
-/* { dg-warning "method definition for .-setA:. not found" "" { target *-*-* } 43 } */
-/* { dg-warning "class .MyClass2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 43 } */
+/* { dg-warning "method definition for .-setA:. not found" "" { target *-*-* } .-1 } */
+/* { dg-warning "class .MyClass2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } .-2 } */
@implementation Bar
@end /* { dg-warning "incomplete implementation of class .Bar." } */
- /* { dg-warning "method definition for .-setFooBar:. not found" "" { target *-*-* } 11 } */
- /* { dg-warning "method definition for .-fooBar. not found" "" { target *-*-* } 11 } */
+ /* { dg-warning "method definition for .-setFooBar:. not found" "" { target *-*-* } .-1 } */
+ /* { dg-warning "method definition for .-fooBar. not found" "" { target *-*-* } .-2 } */
int iVar;
}
@property int FooBar /* { dg-error "expected ':', ',', ';', '\}' or '__attribute__' at end of input" } */
-/* { dg-error "expected ..end. at end of input" "" { target *-*-* } 8 } */
+/* { dg-error "expected ..end. at end of input" "" { target *-*-* } .-1 } */
@synthesize countA; /* { dg-error ".atomic. property .countA. is using bit-field instance variable .countA." } */
@synthesize countB; /* { dg-error "property .countB. is using instance variable .countB. of incompatible type" } */
@end /* { dg-warning "incomplete implementation of class" } */
-/* { dg-warning "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */
-/* { dg-warning "method definition for ..countA. not found" "" { target *-*-* } 29 } */
+/* { dg-warning "method definition for ..setCountA.. not found" "" { target *-*-* } .-1 } */
+/* { dg-warning "method definition for ..countA. not found" "" { target *-*-* } .-2 } */
@implementation Test
@synthesize v1; /* { dg-error "must be an existing ivar" } */
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 15 } */
-/* { dg-warning "method definition for .-setV1:. not found" "" { target *-*-* } 15 } */
-/* { dg-warning "method definition for .-v1. not found" "" { target *-*-* } 15 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-warning "method definition for .-setV1:. not found" "" { target *-*-* } .-2 } */
+/* { dg-warning "method definition for .-v1. not found" "" { target *-*-* } .-3 } */
@implementation Test2
@synthesize w1; /* { dg-error "ivar .w1. used by .@synthesize. declaration must be an existing ivar" } */
@end
-/* { dg-warning "incomplete implementation" "" { target *-*-* } 29 } */
-/* { dg-warning "method definition for .-setW1:. not found" "" { target *-*-* } 29 } */
-/* { dg-warning "method definition for .-w1. not found" "" { target *-*-* } 29 } */
+/* { dg-warning "incomplete implementation" "" { target *-*-* } .-1 } */
+/* { dg-warning "method definition for .-setW1:. not found" "" { target *-*-* } .-2 } */
+/* { dg-warning "method definition for .-w1. not found" "" { target *-*-* } .-3 } */
[stupidVar boo];
[stupidVar foo];
[stupidVar anotherMsg]; /* { dg-warning ".\\-anotherMsg. not found in protocol" } */
- /* { dg-warning "no .\\-anotherMsg. method found" "" { target *-*-* } 51 } */
+ /* { dg-warning "no .\\-anotherMsg. method found" "" { target *-*-* } .-1 } */
return 0;
}
receiver += [receiver anotherValue]; /* { dg-warning "invalid receiver type .intptr_t." } */
receiver += [(Obj *)receiver someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 30 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [(Obj *)receiver anotherValue];
receiver += [(Obj <Proto> *)receiver someValue];
receiver += [(Obj <Proto> *)receiver anotherValue];
receiver += [objrcvr someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 36 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [objrcvr anotherValue];
receiver += [(Obj <Proto> *)objrcvr someValue];
receiver += [objrcvr2 someValue];
receiver += [objrcvr2 anotherValue];
receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */
-/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } 44 } */
+/* { dg-warning "assignment makes integer from pointer without a cast" "" { target *-*-* } .-1 } */
receiver += [(Obj *)objrcvr2 anotherValue];
{
[object1 method]; /* Ok */
[object2 method]; /* { dg-warning ".MyClass. may not respond to ..method." } */
- /* { dg-warning "without a matching method" "" { target *-*-* } 27 } */
- /* { dg-warning "will be assumed to return" "" { target *-*-* } 27 } */
- /* { dg-warning "as arguments" "" { target *-*-* } 27 } */
+ /* { dg-warning "without a matching method" "" { target *-*-* } .-1 } */
+ /* { dg-warning "will be assumed to return" "" { target *-*-* } .-2 } */
+ /* { dg-warning "as arguments" "" { target *-*-* } .-3 } */
}
id test_invalid8 = @"te" @@"s" @"t"; /* { dg-error "repeated .@. before Objective-C string" } */
id test_invalid9 = @"te" @"s" @"t" @; /* { dg-error "stray .@. in program" } */
id test_invalidA = @"te" @ st; /* { dg-error "stray .@. in program" } */
- /* { dg-error "expected" "" { target *-*-* } 31 } */
+ /* { dg-error "expected" "" { target *-*-* } .-1 } */
@interface ArrayTest
{
short unknownSize[unknownValue]; /* { dg-error ".unknownValue. (undeclared|was not declared)" } */
- /* { dg-error "instance variable .unknownSize. has unknown size" "" { target *-*-* } 9 } */
+ /* { dg-error "instance variable .unknownSize. has unknown size" "" { target *-*-* } .-1 } */
struct unknownStruct unknownObj; /* { dg-error "field .unknownObj. has incomplete type" } */
- /* { dg-error "instance variable .unknownObj. has unknown size" "" { target *-*-* } 11 } */
+ /* { dg-error "instance variable .unknownObj. has unknown size" "" { target *-*-* } .-1 } */
long knownSize[3]; /* ok */
char zeroSize[2 - 2]; /* ok (apparently) */
int missingSize[]; /* { dg-error "instance variable .missingSize. has unknown size" } */