From: Joseph Myers Date: Wed, 16 Oct 2024 16:46:49 +0000 (+0000) Subject: testsuite: Prepare for -std=gnu23 default X-Git-Tag: basepoints/gcc-16~5162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fb5348e3021021e82d75e4ca4e6f8d51a34c24f;p=thirdparty%2Fgcc.git testsuite: Prepare for -std=gnu23 default Now that C23 support is essentially feature-complete, I'd like to switch the default language version for C compilation to -std=gnu23. This requires updating a large number of testcases that fail with the new language version if left unchanged. In this patch, update most of the tests for which there is a safe change that works both before and after the update to default language version - typically adding the option -std=gnu17 or -Wno-old-style-definition to the tests. (There are also a few tests where I'd like to investigate further why they fail with -std=gnu23, or where I think such failures show an actual bug to fix before changing the default language version, or where it seems more appropriate to make a testcase change that would result in failures in the absence of the language version change rather than just adding an option that does nothing with the gnu17 default.) The libffi test fixes have also been submitted upstream: . Most of the failures requiring such changes are for one of two reasons: * Unprototyped function declarations with () (meaning the same as (void) in C23 mode) for a function then called with arguments. * Old-style function definitions, which warn by default in C23 mode, so resulting in test failures for the unexpected warnings. Other reasons for failures include: * Tests with their own definitions of bool, true and false. * Tests of diagnostics (often with -pedantic) in cases where C23 has changed semantics, such as: - tag compatibility for structs; - enum values out of range of int; - handing of qualified array types; - decimal floating types formerly needing -pedantic diagnostics, but being standard in C23. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/testsuite/ * c-c++-common/Wcast-function-type.c: Add -std=gnu17 for C. * c-c++-common/Wformat-pr84258.c: Add -std=gnu17 for C. * c-c++-common/Wvarargs.c: Add -std=gnu17 for C. * c-c++-common/analyzer/data-model-12.c: Add -std=gnu17 for C. * c-c++-common/builtins.c: Add -std=gnu17 for C. * c-c++-common/pointer-to-fn1.c: Add -std=gnu17 for C. * c-c++-common/pragma-diag-17.c: Add -std=gnu17 for C. * c-c++-common/sizeof-array-argument.c: Add -Wno-old-style-definition for C. * g++.dg/lto/pr54625-1_0.c: Add -std=gnu17. * g++.dg/lto/pr54625-2_0.c: Add -std=gnu17. * gcc.c-torture/compile/20040214-2.c: Add -std=gnu17. * gcc.c-torture/compile/921011-2.c: Add -std=gnu17. * gcc.c-torture/compile/931102-1.c: Add -std=gnu17. * gcc.c-torture/compile/990801-1.c: Add -std=gnu17. * gcc.c-torture/compile/nested-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr100241-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr106101.c: Add -std=gnu17. * gcc.c-torture/compile/pr113616.c: Add -std=gnu17. * gcc.c-torture/compile/pr47967.c: Add -std=gnu17. * gcc.c-torture/compile/pr51694.c: Add -std=gnu17. * gcc.c-torture/compile/pr71109.c: Add -std=gnu17. * gcc.c-torture/compile/pr83051-2.c: Add -std=gnu17. * gcc.c-torture/compile/pr89663-1.c: Add -std=gnu17. * gcc.c-torture/compile/pr94238.c: Add -std=gnu17. * gcc.c-torture/compile/pr96796.c: Add -std=gnu17. * gcc.c-torture/compile/pr97576.c: Add -std=gnu17. * gcc.c-torture/compile/udivmod4.c: Add -std=gnu17. * gcc.c-torture/execute/20010605-2.c: Add -std=gnu17. * gcc.c-torture/execute/20020404-1.c: Add -std=gnu17. * gcc.c-torture/execute/20030714-1.c: Add -std=gnu17. * gcc.c-torture/execute/20051012-1.c: Add -std=gnu17. * gcc.c-torture/execute/20190820-1.c: Add -std=gnu17. * gcc.c-torture/execute/920612-1.c: Add -Wno-old-style-definition. * gcc.c-torture/execute/930608-1.c: Add -std=gnu17. * gcc.c-torture/execute/comp-goto-1.c: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-1.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-2.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-3.x: Add -std=gnu17. * gcc.c-torture/execute/ieee/fp-cmp-4.x: New file. * gcc.c-torture/execute/ieee/fp-cmp-4f.x: New file. * gcc.c-torture/execute/ieee/fp-cmp-4l.x: New file. * gcc.c-torture/execute/loop-9.c: Add -std=gnu17. * gcc.c-torture/execute/pr103209.c: Add -std=gnu17. * gcc.c-torture/execute/pr28289.c: Add -std=gnu17. * gcc.c-torture/execute/pr34982.c: Add -std=gnu17. * gcc.c-torture/execute/pr67037.c: Add -std=gnu17. * gcc.c-torture/execute/va-arg-2.c: Add -std=gnu17. * gcc.dg/20010202-1.c: Add -std=gnu17. * gcc.dg/20020430-1.c: Add -std=gnu17. * gcc.dg/20031218-3.c: Add -std=gnu17. * gcc.dg/20040127-1.c: Add -std=gnu17. * gcc.dg/20041014-1.c: Add -Wno-old-style-definition. * gcc.dg/20041122-1.c: Add -std=gnu17. * gcc.dg/20050309-1.c: Add -std=gnu17. * gcc.dg/20061026.c: Add -std=gnu17. * gcc.dg/20101010-1.c: Add -std=gnu17. * gcc.dg/Warray-parameter-10.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-2.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-3.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-4.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch-5.c: Add -std=gnu17. * gcc.dg/Wbuiltin-declaration-mismatch.c: Add -std=gnu17. * gcc.dg/Wcxx-compat-2.c: Add -std=gnu17. * gcc.dg/Wdouble-promotion.c: Add -std=gnu17. * gcc.dg/Wfree-nonheap-object-7.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-1.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-1a.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-2.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-3.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-4.c: Add -std=gnu17. * gcc.dg/Wimplicit-int-4a.c: Add -std=gnu17. * gcc.dg/Wincompatible-pointer-types-1.c: Add -std=gnu17. * gcc.dg/Wrestrict-19.c: Add -std=gnu17. * gcc.dg/Wrestrict-4.c: Add -std=gnu17. * gcc.dg/Wrestrict-5.c: Add -std=gnu17. * gcc.dg/Wstrict-overflow-20.c: Add -std=gnu17. * gcc.dg/Wstringop-overflow-13.c: Add -std=gnu17. * gcc.dg/analyzer/doom-d_main-IdentifyVersion.c: Add -std=gnu17. * gcc.dg/analyzer/doom-s_sound-pr108867.c: Add -std=gnu17. * gcc.dg/analyzer/pr93032-mztools-signed-char.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93355-localealias.c: Add -Wno-old-style-definition. * gcc.dg/analyzer/pr93375.c: Add -std=gnu17. * gcc.dg/analyzer/pr94688.c: Add -std=gnu17. * gcc.dg/analyzer/sensitive-1.c: Add -std=gnu17. * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c: Add -std=gnu17. * gcc.dg/analyzer/torture/pr104863.c: Add -std=gnu17. * gcc.dg/analyzer/torture/pr93379.c: Add -std=gnu17. * gcc.dg/array-quals-2.c: Add -std=gnu17. * gcc.dg/attr-invalid.c: Add -Wno-old-style-definition. * gcc.dg/auto-init-uninit-A.c: Add -Wno-old-style-definition. * gcc.dg/builtin-choose-expr.c: Declare exit with (int) prototype. * gcc.dg/builtin-tgmath-err-1.c: Add -std=gnu17. * gcc.dg/builtins-30.c: Add -std=gnu17. * gcc.dg/cast-function-1.c: Add -std=gnu17. * gcc.dg/cleanup-1.c: Add -std=gnu17. * gcc.dg/compat/struct-complex-1_x.c: Add -std=gnu17. * gcc.dg/compat/struct-complex-2_x.c: Add -std=gnu17. * gcc.dg/compat/union-m128-1_x.c: Add -std=gnu17. * gcc.dg/debug/dwarf2/pr66482.c: Add -std=gnu17. * gcc.dg/dfp/composite-type-2.c: Add -std=gnu17. * gcc.dg/dfp/composite-type.c: Add -std=gnu17. * gcc.dg/dfp/keywords-pedantic.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-1.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-2.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-3.c: Add -std=gnu17. * gcc.dg/dremf-type-compat-4.c: Add -std=gnu17. * gcc.dg/enum-compat-1.c: Add -std=gnu17. * gcc.dg/enum-compat-2.c: Add -std=gnu17. * gcc.dg/floatn-errs.c: Add -std=gnu17. * gcc.dg/fltconst-pedantic-dfp.c: Add -std=gnu17. * gcc.dg/format/proto.c: Add -std=gnu17. * gcc.dg/format/sentinel-1.c: Add -std=gnu17. * gcc.dg/gomp/declare-simd-1.c: Add -Wno-old-style-definition. * gcc.dg/ifelse-1.c: Add -Wno-old-style-definition. * gcc.dg/inline-33.c: Add -std=gnu17. * gcc.dg/ipa/inline-5.c: Add -std=gnu17. * gcc.dg/ipa/ipa-sra-21.c: Add -std=gnu17. * gcc.dg/ipa/pr102714.c: Add -std=gnu17. * gcc.dg/ipa/pr104813.c: Add -std=gnu17. * gcc.dg/ipa/pr108679.c: Add -std=gnu17. * gcc.dg/ipa/pr42706.c: Add -std=gnu17. * gcc.dg/ipa/pr88214.c: Add -Wno-old-style-definition. * gcc.dg/ipa/pr91853.c: Add -Wno-old-style-definition. * gcc.dg/ipa/pr93763.c: Add -std=gnu17. * gcc.dg/ipa/pr96482-2.c: Add -std=gnu17. * gcc.dg/lto/20091013-1_2.c: Add -std=gnu17. * gcc.dg/lto/20091015-1_2.c: Add -std=gnu17. * gcc.dg/lto/pr113197_1.c: Add -std=gnu17. * gcc.dg/lto/pr54702_1.c: Add -std=gnu17. * gcc.dg/lto/pr99849_0.c: Add -std=gnu17. * gcc.dg/noncompile/920923-1.c: Add -std=gnu17. * gcc.dg/noncompile/old-style-parm-1.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/old-style-parm-3.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr30552-2.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr30552-3.c: Add -std=gnu17. * gcc.dg/noncompile/pr71265.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr79758-2.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/pr79758.c: Add -Wno-old-style-definition. * gcc.dg/noncompile/va-arg-1.c: Add -std=gnu17. * gcc.dg/old-style-prom-1.c: Add -std=gnu17. * gcc.dg/old-style-prom-2.c: Add -std=gnu17. * gcc.dg/old-style-prom-3.c: Add -std=gnu17. * gcc.dg/old-style-then-proto-1.c: Add -std=gnu17. * gcc.dg/parm-incomplete-1.c: Add -std=gnu17. * gcc.dg/parm-mismatch-1.c: Add -std=gnu17. * gcc.dg/permerror-default.c: Add -std=gnu17. * gcc.dg/permerror-fpermissive-nowarning.c: Add -std=gnu17. * gcc.dg/permerror-fpermissive.c: Add -std=gnu17. * gcc.dg/permerror-noerror.c: Add -std=gnu17. * gcc.dg/permerror-nowarning.c: Add -std=gnu17. * gcc.dg/permerror-pedantic.c: Add -std=gnu17. * gcc.dg/plugin/infoleak-net-ethtool-ioctl.c: Add -std=gnu17. * gcc.dg/pointer-array-quals-1.c: Add -std=gnu17. * gcc.dg/pointer-array-quals-2.c: Add -std=gnu17. * gcc.dg/pr100791.c: Add -std=gnu17. * gcc.dg/pr100843.c: Add -std=gnu17. * gcc.dg/pr102273.c: Add -std=gnu17. * gcc.dg/pr102385.c: Add -std=gnu17. * gcc.dg/pr103222.c: Add -std=gnu17. * gcc.dg/pr105140.c: Add -std=gnu17. * gcc.dg/pr105150.c: Add -std=gnu17. * gcc.dg/pr105250.c: Add -std=gnu17. * gcc.dg/pr105972.c: Add -Wno-old-style-definition. * gcc.dg/pr111039.c: Add -std=gnu17. * gcc.dg/pr111407.c: Add -std=gnu17. * gcc.dg/pr111922.c: Add -Wno-old-style-definition. * gcc.dg/pr15236.c: Add -std=gnu17. * gcc.dg/pr17188-1.c: Add -std=gnu17. * gcc.dg/pr20368-1.c: Add -std=gnu17. * gcc.dg/pr20368-2.c: Add -std=gnu17. * gcc.dg/pr20368-3.c: Add -std=gnu17. * gcc.dg/pr27331.c: Add -Wno-old-style-definition. * gcc.dg/pr27861-1.c: Add -std=gnu17. * gcc.dg/pr28121.c: Add -std=gnu17. * gcc.dg/pr28243.c: Add -std=gnu17. * gcc.dg/pr28888.c: Add -std=gnu17. * gcc.dg/pr29254.c: Add -std=gnu17. * gcc.dg/pr34457-1.c: Add -std=gnu17. * gcc.dg/pr36015.c: Add -std=gnu17. * gcc.dg/pr38245-3.c: Add -std=gnu17. * gcc.dg/pr38245-4.c: Add -std=gnu17. * gcc.dg/pr41241.c: Add -std=gnu17. * gcc.dg/pr43058.c: Add -std=gnu17. * gcc.dg/pr44539.c: Add -std=gnu17. * gcc.dg/pr45055.c: Add -std=gnu17. * gcc.dg/pr50908.c: Add -Wno-old-style-definition. * gcc.dg/pr60647-1.c: Add -Wno-old-style-definition. * gcc.dg/pr63762.c: Add -std=gnu17. * gcc.dg/pr63804.c: Add -std=gnu17. * gcc.dg/pr68306-3.c: Add -std=gnu17. * gcc.dg/pr68533.c: Add -std=gnu17. * gcc.dg/pr69156.c: Add -std=gnu17. * gcc.dg/pr7356-2.c: Add -Wno-old-style-definition. * gcc.dg/pr79983.c: Add -std=gnu17. * gcc.dg/pr83463.c: Add -std=gnu17. * gcc.dg/pr87347.c: Add -std=gnu17. * gcc.dg/pr89521-1.c: Add -std=gnu17. * gcc.dg/pr89521-2.c: Add -std=gnu17. * gcc.dg/pr90648.c: Add -std=gnu17. * gcc.dg/pr93573-1.c: Add -std=gnu17. * gcc.dg/pr94167.c: Add -std=gnu17. * gcc.dg/pr94705.c: Add -std=gnu17. * gcc.dg/pr95118.c: Add -std=gnu17. * gcc.dg/pr96335.c: Add -std=gnu17. * gcc.dg/pr97830.c: Add -std=gnu17. * gcc.dg/pr97882.c: Add -std=gnu17. * gcc.dg/pr99122-2.c: Add -std=gnu17. * gcc.dg/pr99122-3.c: Add -std=gnu17. * gcc.dg/qual-component-1.c: Add -std=gnu17. * gcc.dg/sibcall-6.c: Add -Wno-old-style-definition. * gcc.dg/sms-2.c: Add -Wno-old-style-definition. * gcc.dg/tm/20091221.c: Add -std=gnu17. * gcc.dg/torture/bfloat16-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float128-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float128x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float16-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float32-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float32x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float64-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/float64x-basic.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr102762.c: Add -std=gnu17. * gcc.dg/torture/pr103987.c: Add -std=gnu17. * gcc.dg/torture/pr104825.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr105166.c: Add -std=gnu17. * gcc.dg/torture/pr105185.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr109652.c: Add -std=gnu17. * gcc.dg/torture/pr112444.c: Add -std=gnu17. * gcc.dg/torture/pr113895-3.c: Add -std=gnu17. * gcc.dg/torture/pr24626-2.c: Add -std=gnu17. * gcc.dg/torture/pr25183.c: Add -std=gnu17. * gcc.dg/torture/pr38948.c: Add -std=gnu17. * gcc.dg/torture/pr44807.c: Add -std=gnu17. * gcc.dg/torture/pr47281.c: Add -std=gnu17. * gcc.dg/torture/pr47958-1.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr48063.c: Add -std=gnu17. * gcc.dg/torture/pr57036-1.c: Add -std=gnu17. * gcc.dg/torture/pr57330.c: Add -std=gnu17. * gcc.dg/torture/pr57584.c: Add -std=gnu17. * gcc.dg/torture/pr67741.c: Add -std=gnu17. * gcc.dg/torture/pr68104.c: Add -std=gnu17. * gcc.dg/torture/pr69242.c: Add -std=gnu17. * gcc.dg/torture/pr70457.c: Add -std=gnu17. * gcc.dg/torture/pr70985.c: Add -std=gnu17. * gcc.dg/torture/pr71606.c: Add -std=gnu17. * gcc.dg/torture/pr71816.c: Add -std=gnu17. * gcc.dg/torture/pr77286.c: Add -std=gnu17. * gcc.dg/torture/pr77646.c: Add -std=gnu17. * gcc.dg/torture/pr77677-2.c: Add -std=gnu17. * gcc.dg/torture/pr78365.c: Add -Wno-old-style-definition. * gcc.dg/torture/pr79732.c: Add -std=gnu17. * gcc.dg/torture/pr80612.c: Add -std=gnu17. * gcc.dg/torture/pr80764.c: Add -std=gnu17. * gcc.dg/torture/pr80842.c: Add -std=gnu17. * gcc.dg/torture/pr81900.c: Add -std=gnu17. * gcc.dg/torture/pr82276.c: Add -std=gnu17. * gcc.dg/torture/pr84803.c: Add -std=gnu17. * gcc.dg/torture/pr93124.c: Add -std=gnu17. * gcc.dg/torture/pr97330-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-prof/comp-goto-1.c: Add -std=gnu17. * gcc.dg/tree-ssa/20030703-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030708-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030709-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030709-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030710-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030711-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030714-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030714-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030728-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-10.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-11.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-3.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-6.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030807-7.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-4.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-5.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030814-6.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20030918-1.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/20040514-2.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/loadpre7.c: Add -Wno-old-style-definition. * gcc.dg/tree-ssa/pr111003.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr115128.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr115191.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr24840.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr69666.c: Add -std=gnu17. * gcc.dg/tree-ssa/pr70232.c: Add -std=gnu17. * gcc.dg/ubsan/pr79757-1.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr79757-2.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr79757-3.c: Add -Wno-old-style-definition. * gcc.dg/ubsan/pr81223.c: Add -std=gnu17. * gcc.dg/uninit-10-O0.c: Add -Wno-old-style-definition. * gcc.dg/uninit-10.c: Add -Wno-old-style-definition. * gcc.dg/uninit-32.c: Add -std=gnu17. * gcc.dg/uninit-41.c: Add -std=gnu17. * gcc.dg/uninit-A-O0.c: Add -Wno-old-style-definition. * gcc.dg/uninit-A.c: Add -Wno-old-style-definition. * gcc.dg/unused-1.c: Add -Wno-old-style-definition. * gcc.dg/vect/bb-slp-pr114249.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-pr97486.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-1.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-2.c: Add -std=gnu17. * gcc.dg/vect/bb-slp-subgroups-3.c: Add -std=gnu17. * gcc.dg/vect/vect-early-break_111-pr113731.c: Add -std=gnu17. * gcc.dg/vect/vect-early-break_122-pr114239.c: Add -std=gnu17. * gcc.dg/vect/vect-multi-peel-gaps.c: Add -std=gnu17. * gcc.dg/vla-stexp-2.c: Add -std=gnu17. * gcc.dg/warn-1.c: Add -Wno-old-style-definition. * gcc.dg/winline-10.c: Add -Wno-old-style-definition. * gcc.dg/wtr-label-1.c: Add -Wno-old-style-definition. * gcc.dg/wtr-switch-1.c: Add -Wno-old-style-definition. * gcc.target/i386/excess-precision-3.c: Add -Wno-old-style-definition. * gcc.target/i386/fma4-256-nmsubXX.c: Add -std=gnu17. * gcc.target/i386/fma4-nmsubXX.c: Add -std=gnu17. * gcc.target/i386/nop-mcount.c: Add -Wno-old-style-definition. * gcc.target/i386/pr102627.c: Add -std=gnu17. * gcc.target/i386/pr106994.c: Add -std=gnu17. * gcc.target/i386/pr68349.c: Add -std=gnu17. * gcc.target/i386/pr97313.c: Add -std=gnu17. * gcc.target/i386/pr99454.c: Add -std=gnu17. * gcc.target/i386/record-mcount.c: Add -Wno-old-style-definition. libffi/ * testsuite/libffi.call/va_struct2.c (test_fn): Cast n to void. * testsuite/libffi.call/va_struct3.c (test_fn): Likewise. Backported from . --- diff --git a/gcc/testsuite/c-c++-common/Wcast-function-type.c b/gcc/testsuite/c-c++-common/Wcast-function-type.c index b49da4868146..8f2997d71fae 100644 --- a/gcc/testsuite/c-c++-common/Wcast-function-type.c +++ b/gcc/testsuite/c-c++-common/Wcast-function-type.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Wcast-function-type" } */ +/* { dg-additional-options "-std=gnu17" { target c } } */ int f(long); diff --git a/gcc/testsuite/c-c++-common/Wformat-pr84258.c b/gcc/testsuite/c-c++-common/Wformat-pr84258.c index d2870a887019..10fa9ba2133e 100644 --- a/gcc/testsuite/c-c++-common/Wformat-pr84258.c +++ b/gcc/testsuite/c-c++-common/Wformat-pr84258.c @@ -1,4 +1,5 @@ /* { dg-options "-Wformat" } */ +/* { dg-additional-options "-std=gnu17" { target c } } */ int main (int argc, char **argv) { diff --git a/gcc/testsuite/c-c++-common/Wvarargs.c b/gcc/testsuite/c-c++-common/Wvarargs.c index bfd8276a2920..ea86ba30dcd7 100644 --- a/gcc/testsuite/c-c++-common/Wvarargs.c +++ b/gcc/testsuite/c-c++-common/Wvarargs.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" { target c } } */ #include diff --git a/gcc/testsuite/c-c++-common/analyzer/data-model-12.c b/gcc/testsuite/c-c++-common/analyzer/data-model-12.c index 653b7ad62846..e4a7fbdae442 100644 --- a/gcc/testsuite/c-c++-common/analyzer/data-model-12.c +++ b/gcc/testsuite/c-c++-common/analyzer/data-model-12.c @@ -1,4 +1,5 @@ /* Mismatching decl of foo. */ +/* { dg-additional-options "-std=gnu17" { target c } } */ int foo (); diff --git a/gcc/testsuite/c-c++-common/builtins.c b/gcc/testsuite/c-c++-common/builtins.c index 527c77e7952e..f44d0d3286b6 100644 --- a/gcc/testsuite/c-c++-common/builtins.c +++ b/gcc/testsuite/c-c++-common/builtins.c @@ -2,7 +2,7 @@ with no prototype do not cause an ICE. { dg-do compile } { dg-options "-O2 -Wall -Wextra" } - { dg-additional-options "-fpermissive" { target c } } + { dg-additional-options "-std=gnu17 -fpermissive" { target c } } { dg-prune-output "warning" } { dg-require-effective-target alloca } */ diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c index 70a5831c9589..862ca7ab682c 100644 --- a/gcc/testsuite/c-c++-common/pointer-to-fn1.c +++ b/gcc/testsuite/c-c++-common/pointer-to-fn1.c @@ -1,6 +1,7 @@ /* PR c++/106937 */ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fpermissive -fcf-protection" } */ +/* { dg-additional-options "-std=gnu17" { target c } } */ /* { dg-additional-options "-std=c++11" { target c++ } } */ /* Test printing a pointer to function with attribute. */ diff --git a/gcc/testsuite/c-c++-common/pragma-diag-17.c b/gcc/testsuite/c-c++-common/pragma-diag-17.c index a44ce90f98b1..93206f0e35b3 100644 --- a/gcc/testsuite/c-c++-common/pragma-diag-17.c +++ b/gcc/testsuite/c-c++-common/pragma-diag-17.c @@ -1,5 +1,6 @@ /* Test silencing the numeric constant extension pedwarns. */ /* { dg-options "-pedantic-errors" } */ +/* { dg-additional-options "-std=gnu17" { target c } } */ /* { dg-additional-options -fext-numeric-literals { target c++14 } } */ #pragma GCC diagnostic push diff --git a/gcc/testsuite/c-c++-common/sizeof-array-argument.c b/gcc/testsuite/c-c++-common/sizeof-array-argument.c index eedfceec2cfc..f2b2d33289a8 100644 --- a/gcc/testsuite/c-c++-common/sizeof-array-argument.c +++ b/gcc/testsuite/c-c++-common/sizeof-array-argument.c @@ -1,5 +1,6 @@ /* PR c/6940 */ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" { target c } } */ /* Test -Wsizeof-array-argument warning. */ diff --git a/gcc/testsuite/g++.dg/lto/pr54625-1_0.c b/gcc/testsuite/g++.dg/lto/pr54625-1_0.c index b1455e8c90b9..59df1aaf58fc 100644 --- a/gcc/testsuite/g++.dg/lto/pr54625-1_0.c +++ b/gcc/testsuite/g++.dg/lto/pr54625-1_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options { { -O0 -flto -w } { -O2 -flto -w } } } */ +/* { dg-lto-options { { -O0 -flto -w -std=gnu17 } { -O2 -flto -w -std=gnu17 } } } */ /* { dg-extra-ld-options { -r -nostdlib -flinker-output=nolto-rel } } */ float a; diff --git a/gcc/testsuite/g++.dg/lto/pr54625-2_0.c b/gcc/testsuite/g++.dg/lto/pr54625-2_0.c index 1ba463d70e89..b7a53c6bc9aa 100644 --- a/gcc/testsuite/g++.dg/lto/pr54625-2_0.c +++ b/gcc/testsuite/g++.dg/lto/pr54625-2_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options { { -O0 -flto -w } { -O2 -flto -w } } } */ +/* { dg-lto-options { { -O0 -flto -w -std=gnu17 } { -O2 -flto -w -std=gnu17 } } } */ /* { dg-extra-ld-options { -r -nostdlib -flinker-output=nolto-rel } } */ float a; diff --git a/gcc/testsuite/gcc.c-torture/compile/20040214-2.c b/gcc/testsuite/gcc.c-torture/compile/20040214-2.c index 352d5a5d7641..a4fe1d278656 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20040214-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/20040214-2.c @@ -1,4 +1,5 @@ /* http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01307.html */ +/* { dg-additional-options "-std=gnu17" } */ typedef struct xdef xdef; struct xdef diff --git a/gcc/testsuite/gcc.c-torture/compile/921011-2.c b/gcc/testsuite/gcc.c-torture/compile/921011-2.c index bf11dad979ff..dbee95420214 100644 --- a/gcc/testsuite/gcc.c-torture/compile/921011-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/921011-2.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + extern int foobar1 (); typedef struct diff --git a/gcc/testsuite/gcc.c-torture/compile/931102-1.c b/gcc/testsuite/gcc.c-torture/compile/931102-1.c index f60b27993027..83568c1209b9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/931102-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/931102-1.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + char *e (); #define SET \ diff --git a/gcc/testsuite/gcc.c-torture/compile/990801-1.c b/gcc/testsuite/gcc.c-torture/compile/990801-1.c index d35ec87b9489..6459a1174c95 100644 --- a/gcc/testsuite/gcc.c-torture/compile/990801-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/990801-1.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + extern int getch(); extern int class(); diff --git a/gcc/testsuite/gcc.c-torture/compile/nested-1.c b/gcc/testsuite/gcc.c-torture/compile/nested-1.c index 135538a8524a..7baade75283f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/nested-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/nested-1.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target trampolines } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c index 593ef96bdb7c..1104580a4e6b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr100241-1.c @@ -1,5 +1,6 @@ /* { dg-require-visibility "" } */ /* { dg-options "-fvisibility=internal -fPIC" { target fpic } } */ +/* { dg-additional-options "-std=gnu17" } */ extern char num_4x4_blocks_high_lookup, num_4x4_blocks_wide_lookup, vp9_foreach_transformed_block_in_plane_xd_0_0_0; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106101.c b/gcc/testsuite/gcc.c-torture/compile/pr106101.c index e307afcbccc7..664ecec1053c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr106101.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr106101.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ extern char *globerr; char **ftpglob(); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr113616.c b/gcc/testsuite/gcc.c-torture/compile/pr113616.c index 04c38eadffb5..a862e8bd91c8 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr113616.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr113616.c @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-g" } +// { dg-options "-std=gnu17 -g" } struct A { struct A *a; } foo (); struct B { long b; }; struct C { struct B c; struct A d; } *e; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr47967.c b/gcc/testsuite/gcc.c-torture/compile/pr47967.c index fe1f9c2ef753..39d73c6bfff9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr47967.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr47967.c @@ -1,4 +1,5 @@ /* PR tree-optimization/47967 */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target untyped_assembly } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51694.c b/gcc/testsuite/gcc.c-torture/compile/pr51694.c index 9eddc0bf405d..00e6ea378a7f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr51694.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr51694.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target untyped_assembly } */ /* { dg-require-effective-target indirect_calls } */ -/* { dg-additional-options "-fpermissive" } */ +/* { dg-additional-options "-std=gnu17 -fpermissive" } */ void foo (x, fn) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr71109.c b/gcc/testsuite/gcc.c-torture/compile/pr71109.c index b44ba07123ee..fae98fb019dc 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr71109.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr71109.c @@ -1,4 +1,5 @@ /* PR tree-optimization/71109 */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target non_strict_prototype } */ struct S { int g, h; signed char i; int j; signed char k; int l[4]; } a, c; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr83051-2.c b/gcc/testsuite/gcc.c-torture/compile/pr83051-2.c index 4718a276bdba..3d49ed817b04 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr83051-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr83051-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-fno-early-inlining" } */ +/* { dg-options "-std=gnu17 -fno-early-inlining" } */ /* { dg-require-effective-target non_strict_prototype } */ void diff --git a/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c b/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c index 659925d6c87d..13ffa903561a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c @@ -1,4 +1,5 @@ /* PR middle-end/89663 */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target non_strict_prototype } */ int irint (); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr94238.c b/gcc/testsuite/gcc.c-torture/compile/pr94238.c index 5a96a64d85b4..0d32cebd9def 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr94238.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr94238.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + enum { false, true } a; int b, c, d, e, f; int fn3(); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr96796.c b/gcc/testsuite/gcc.c-torture/compile/pr96796.c index debbe62e22f4..8deee01237f7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr96796.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr96796.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-fpermissive -fcommon" } */ +/* { dg-additional-options "-std=gnu17 -fpermissive -fcommon" } */ /* { dg-require-effective-target non_strict_prototype } */ struct S0 { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr97576.c b/gcc/testsuite/gcc.c-torture/compile/pr97576.c index d2816132cc0c..4bcadabcca07 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr97576.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr97576.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target non_strict_prototype } */ void diff --git a/gcc/testsuite/gcc.c-torture/compile/udivmod4.c b/gcc/testsuite/gcc.c-torture/compile/udivmod4.c index 9d98a3d575db..5297dc9d2f1e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/udivmod4.c +++ b/gcc/testsuite/gcc.c-torture/compile/udivmod4.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-fpermissive" } */ +/* { dg-additional-options "-std=gnu17 -fpermissive" } */ long long xlrandom () diff --git a/gcc/testsuite/gcc.c-torture/execute/20010605-2.c b/gcc/testsuite/gcc.c-torture/execute/20010605-2.c index 837e0a960d62..ef435bc00ee8 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20010605-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/20010605-2.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-fpermissive" } */ +/* { dg-additional-options "-std=gnu17 -fpermissive" } */ void foo (), bar (), baz (); int main () diff --git a/gcc/testsuite/gcc.c-torture/execute/20020404-1.c b/gcc/testsuite/gcc.c-torture/execute/20020404-1.c index 53b340834005..95b0adc02447 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20020404-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20020404-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target int32plus } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-skip-if "pointers can be truncated" { m32c-*-* } } */ /* Extracted from GDB sources. */ diff --git a/gcc/testsuite/gcc.c-torture/execute/20030714-1.c b/gcc/testsuite/gcc.c-torture/execute/20030714-1.c index 719baede26f5..443fea84dda0 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20030714-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20030714-1.c @@ -1,4 +1,5 @@ /* derived from PR optimization/11440 */ +/* { dg-additional-options "-std=gnu17" } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.c-torture/execute/20051012-1.c b/gcc/testsuite/gcc.c-torture/execute/20051012-1.c index d43aeda82855..e9240da06d39 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20051012-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20051012-1.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target untyped_assembly } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/20190820-1.c b/gcc/testsuite/gcc.c-torture/execute/20190820-1.c index 10e48d35750f..c122ff38dac4 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20190820-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20190820-1.c @@ -1,5 +1,6 @@ /* PR rtl-optimization/91347 */ /* Reported by John David Anglin */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target int32plus } */ typedef unsigned short __u16; diff --git a/gcc/testsuite/gcc.c-torture/execute/920612-1.c b/gcc/testsuite/gcc.c-torture/execute/920612-1.c index 8553de2c5afa..2f369b516f92 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920612-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/920612-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-fwrapv" } */ +/* { dg-options "-Wno-old-style-definition -fwrapv" } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.c-torture/execute/930608-1.c b/gcc/testsuite/gcc.c-torture/execute/930608-1.c index 1f29aa5d07bf..fd2675904817 100644 --- a/gcc/testsuite/gcc.c-torture/execute/930608-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/930608-1.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + void abort (void); void exit (int); diff --git a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c index 6be63c097ac8..7bfc9d4f12a9 100644 --- a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target label_values } */ /* { dg-require-stack-size "4000" } */ diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.x index 84c193fe0e47..ec107bc50c35 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.x @@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] { } } +lappend additional_flags "-std=gnu17" + return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x index 84c193fe0e47..ec107bc50c35 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.x @@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] { } } +lappend additional_flags "-std=gnu17" + return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.x index 84c193fe0e47..ec107bc50c35 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.x +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.x @@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] { } } +lappend additional_flags "-std=gnu17" + return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.x new file mode 100644 index 000000000000..9baf8e1cbbb3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.x @@ -0,0 +1,2 @@ +lappend additional_flags "-std=gnu17" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x new file mode 100644 index 000000000000..9baf8e1cbbb3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x @@ -0,0 +1,2 @@ +lappend additional_flags "-std=gnu17" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4l.x b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4l.x new file mode 100644 index 000000000000..9baf8e1cbbb3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4l.x @@ -0,0 +1,2 @@ +lappend additional_flags "-std=gnu17" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-9.c b/gcc/testsuite/gcc.c-torture/execute/loop-9.c index 523057593a3f..c0798c324468 100644 --- a/gcc/testsuite/gcc.c-torture/execute/loop-9.c +++ b/gcc/testsuite/gcc.c-torture/execute/loop-9.c @@ -1,4 +1,5 @@ /* Source: Neil Booth, from PR # 115. */ +/* { dg-additional-options "-std=gnu17" } */ int false() { diff --git a/gcc/testsuite/gcc.c-torture/execute/pr103209.c b/gcc/testsuite/gcc.c-torture/execute/pr103209.c index 481689396f44..ecc23129676a 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr103209.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr103209.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + #include #include diff --git a/gcc/testsuite/gcc.c-torture/execute/pr28289.c b/gcc/testsuite/gcc.c-torture/execute/pr28289.c index 93e922cbb1fa..276a0f4b9016 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr28289.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr28289.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + extern int ok (int); extern void exit (); static int gen_x86_64_shrd (int); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr34982.c b/gcc/testsuite/gcc.c-torture/execute/pr34982.c index 1500847d0e83..4289a1842498 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr34982.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr34982.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + extern void abort (void); static void something(); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr67037.c b/gcc/testsuite/gcc.c-torture/execute/pr67037.c index 3119d327b02a..da626e8da8ce 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr67037.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr67037.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + long (*extfunc)(); static inline void lstrcpynW( short *d, const short *s, int n ) diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c index 56f8e14fdde9..d44cefc14272 100644 --- a/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c @@ -2,6 +2,7 @@ in regs and on the stack. We test 16 cases, trying to catch multiple targets (some use 3 regs for argument passing, some use 12, etc.). We test both the arguments and the `lastarg' (the argument to va_start). */ +/* { dg-additional-options "-std=gnu17" } */ #include diff --git a/gcc/testsuite/gcc.dg/20010202-1.c b/gcc/testsuite/gcc.dg/20010202-1.c index 5f789042ebab..418e552cd575 100644 --- a/gcc/testsuite/gcc.dg/20010202-1.c +++ b/gcc/testsuite/gcc.dg/20010202-1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-* sparc*-*-* x86_64-*-* } } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/20020430-1.c b/gcc/testsuite/gcc.dg/20020430-1.c index f48bb672aaf6..2690b3835d9e 100644 --- a/gcc/testsuite/gcc.dg/20020430-1.c +++ b/gcc/testsuite/gcc.dg/20020430-1.c @@ -5,7 +5,7 @@ which left a reference to the deleted ADDR_VEC. */ /* { dg-do compile { target fpic } } */ -/* { dg-options "-O2 -frename-registers -fpic" } */ +/* { dg-options "-std=gnu17 -O2 -frename-registers -fpic" } */ /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */ typedef unsigned long XID; diff --git a/gcc/testsuite/gcc.dg/20031218-3.c b/gcc/testsuite/gcc.dg/20031218-3.c index 0bae456b8e76..10f8e775f116 100644 --- a/gcc/testsuite/gcc.dg/20031218-3.c +++ b/gcc/testsuite/gcc.dg/20031218-3.c @@ -3,7 +3,7 @@ The problem was that this just to ICE with -O2 -g. */ /* { dg-do compile } */ -/* { dg-options "-O2 -g" } */ +/* { dg-options "-std=gnu17 -O2 -g" } */ extern __SIZE_TYPE__ strlen (const char *); diff --git a/gcc/testsuite/gcc.dg/20040127-1.c b/gcc/testsuite/gcc.dg/20040127-1.c index 0ea6062a5a91..3295dee97e39 100644 --- a/gcc/testsuite/gcc.dg/20040127-1.c +++ b/gcc/testsuite/gcc.dg/20040127-1.c @@ -5,7 +5,7 @@ floating-point registers on SPARC64. */ /* { dg-do assemble } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ extern int foo1(); extern int foo2(); diff --git a/gcc/testsuite/gcc.dg/20041014-1.c b/gcc/testsuite/gcc.dg/20041014-1.c index 699844074ed6..b2e9959616d0 100644 --- a/gcc/testsuite/gcc.dg/20041014-1.c +++ b/gcc/testsuite/gcc.dg/20041014-1.c @@ -1,6 +1,6 @@ /* PR c/17023 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ void f(a, b) diff --git a/gcc/testsuite/gcc.dg/20041122-1.c b/gcc/testsuite/gcc.dg/20041122-1.c index b2120f815456..889c7815eb33 100644 --- a/gcc/testsuite/gcc.dg/20041122-1.c +++ b/gcc/testsuite/gcc.dg/20041122-1.c @@ -1,6 +1,6 @@ /* PR rtl-optimization/18611 */ /* { dg-do compile } */ -/* { dg-options "-O1 -fmove-loop-invariants" } */ +/* { dg-options "-std=gnu17 -O1 -fmove-loop-invariants" } */ void dumpCineonChannelInfo (); typedef struct { diff --git a/gcc/testsuite/gcc.dg/20050309-1.c b/gcc/testsuite/gcc.dg/20050309-1.c index 46b27f82e29c..d17bdaf30bc6 100644 --- a/gcc/testsuite/gcc.dg/20050309-1.c +++ b/gcc/testsuite/gcc.dg/20050309-1.c @@ -3,7 +3,7 @@ /* { dg-do compile } */ /* { dg-require-profiling "-fprofile-generate" } */ -/* { dg-options "-O2 -fprofile-generate" } */ +/* { dg-options "-std=gnu17 -O2 -fprofile-generate" } */ void lookup (); int hash (); diff --git a/gcc/testsuite/gcc.dg/20061026.c b/gcc/testsuite/gcc.dg/20061026.c index fa8069ce4cfa..dbba84eab91f 100644 --- a/gcc/testsuite/gcc.dg/20061026.c +++ b/gcc/testsuite/gcc.dg/20061026.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1" } */ +/* { dg-options "-std=gnu17 -O1" } */ /* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */ /* This testcase failed on s390. The frame size for function f will be diff --git a/gcc/testsuite/gcc.dg/20101010-1.c b/gcc/testsuite/gcc.dg/20101010-1.c index 2067012ebcda..d47071742b56 100644 --- a/gcc/testsuite/gcc.dg/20101010-1.c +++ b/gcc/testsuite/gcc.dg/20101010-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-crossjumping" } */ +/* { dg-options "-std=gnu17 -O2 -fno-crossjumping" } */ /* { dg-require-effective-target alloca } */ int bar1 (); diff --git a/gcc/testsuite/gcc.dg/Warray-parameter-10.c b/gcc/testsuite/gcc.dg/Warray-parameter-10.c index 378f8afbd340..b10a82d04320 100644 --- a/gcc/testsuite/gcc.dg/Warray-parameter-10.c +++ b/gcc/testsuite/gcc.dg/Warray-parameter-10.c @@ -1,7 +1,7 @@ /* PR c/102759 - ICE calling a function taking an argument redeclared without a prototype. { dg-do compile } - { dg-options "-Wall" } */ + { dg-options "-std=gnu17 -Wall" } */ void f (void) { diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-2.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-2.c index 9d75cd8669cf..42733cda8150 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-2.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-2.c @@ -1,7 +1,7 @@ /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration without prototype { dg-do compile } - { dg-options "-Wall -Wextra" } */ + { dg-options "-std=gnu17 -Wall -Wextra" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c index bc6527933232..91363ed1de5d 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c @@ -1,7 +1,7 @@ /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration without prototype { dg-do compile } - { dg-options "-fpermissive -Wbuiltin-declaration-mismatch" } */ + { dg-options "-std=gnu17 -fpermissive -Wbuiltin-declaration-mismatch" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c index e845b43c0736..c48fe5fcf300 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c @@ -1,7 +1,7 @@ /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration without prototype { dg-do compile } - { dg-options "-Wbuiltin-declaration-mismatch" } */ + { dg-options "-std=gnu17 -Wbuiltin-declaration-mismatch" } */ typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-5.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-5.c index 9cac92777503..08e677e06058 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-5.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-5.c @@ -1,6 +1,6 @@ /* PR testsuite/88098 - FAIL: gcc.dg/Wbuiltin-declaration-mismatch-4.c { dg-do compile } - { dg-options "-Wbuiltin-declaration-mismatch -fshort-enums" } */ + { dg-options "-std=gnu17 -Wbuiltin-declaration-mismatch -fshort-enums" } */ int abs (); double fabs (); /* { dg-message "built-in .fabs. declared here" } */ diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch.c index ed66fd3626b9..fb456e0421c7 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch.c @@ -1,7 +1,7 @@ /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration without prototype { dg-do compile } - { dg-options "-Wall" } */ + { dg-options "-std=gnu17 -Wall" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-2.c b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c index 4578bece109d..938414aee8e9 100644 --- a/gcc/testsuite/gcc.dg/Wcxx-compat-2.c +++ b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-Wc++-compat" } */ +/* { dg-options "-std=gnu17 -Wc++-compat" } */ _Bool foo; /* This is okay. */ int bool; /* { dg-warning "5:keyword" } */ diff --git a/gcc/testsuite/gcc.dg/Wdouble-promotion.c b/gcc/testsuite/gcc.dg/Wdouble-promotion.c index 0ad77915d8a3..c002b2ef1485 100644 --- a/gcc/testsuite/gcc.dg/Wdouble-promotion.c +++ b/gcc/testsuite/gcc.dg/Wdouble-promotion.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -Wdouble-promotion" } */ +/* { dg-options "-std=gnu17 -fpermissive -Wdouble-promotion" } */ #include diff --git a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-7.c b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-7.c index 6116bfa4d8ea..52cfbf9ec5d6 100644 --- a/gcc/testsuite/gcc.dg/Wfree-nonheap-object-7.c +++ b/gcc/testsuite/gcc.dg/Wfree-nonheap-object-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Wfree-nonheap-object" } */ +/* { dg-options "-std=gnu17 -O2 -Wfree-nonheap-object" } */ struct local_caches *get_local_caches_lcs; void *calloc(long, long); diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-1.c b/gcc/testsuite/gcc.dg/Wimplicit-int-1.c index fc7726c517e6..206db40e4cd0 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-1.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive" } */ +/* { dg-options "-std=gnu17 -fpermissive" } */ static l; /* { dg-warning "type defaults to" } */ diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-1a.c b/gcc/testsuite/gcc.dg/Wimplicit-int-1a.c index ef1835e2d3a1..0f7880d117f5 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-1a.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-1a.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17 " } */ static l; /* { dg-error "type defaults to" } */ diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-2.c b/gcc/testsuite/gcc.dg/Wimplicit-int-2.c index 4ff16f367382..cd2c1ef2441d 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-2.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ static l; /* { dg-error "type defaults to" } */ diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-3.c b/gcc/testsuite/gcc.dg/Wimplicit-int-3.c index 654ce736c25b..5980c81afb87 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-3.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors -Wno-implicit-int" } */ +/* { dg-options "-std=gnu17 -pedantic-errors -Wno-implicit-int" } */ static l; diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-4.c b/gcc/testsuite/gcc.dg/Wimplicit-int-4.c index 99c61a76ecfe..28f5da5eed53 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-4.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -Wno-implicit -Wimplicit-int" } */ +/* { dg-options "-std=gnu17 -fpermissive -Wno-implicit -Wimplicit-int" } */ static l; /* { dg-warning "type defaults to" } */ diff --git a/gcc/testsuite/gcc.dg/Wimplicit-int-4a.c b/gcc/testsuite/gcc.dg/Wimplicit-int-4a.c index 920a088f02b3..b507620300aa 100644 --- a/gcc/testsuite/gcc.dg/Wimplicit-int-4a.c +++ b/gcc/testsuite/gcc.dg/Wimplicit-int-4a.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Wno-implicit -Wimplicit-int" } */ +/* { dg-options "-std=gnu17 -Wno-implicit -Wimplicit-int" } */ static l; /* { dg-error "type defaults to" } */ diff --git a/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c b/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c index 4ae7b1d99ceb..4e47a30c234d 100644 --- a/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c +++ b/gcc/testsuite/gcc.dg/Wincompatible-pointer-types-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ void f (int, ...); diff --git a/gcc/testsuite/gcc.dg/Wrestrict-19.c b/gcc/testsuite/gcc.dg/Wrestrict-19.c index d4750537c55a..73b4302fa874 100644 --- a/gcc/testsuite/gcc.dg/Wrestrict-19.c +++ b/gcc/testsuite/gcc.dg/Wrestrict-19.c @@ -1,7 +1,7 @@ /* PR middle-end/89934 - ICE on a call with fewer arguments to strncpy declared without prototype { dg-do compile } - { dg-options "-O2 -Wall" } */ + { dg-options "-std=gnu17 -O2 -Wall" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Wrestrict-4.c b/gcc/testsuite/gcc.dg/Wrestrict-4.c index a95960e751a2..e7b62af9cc75 100644 --- a/gcc/testsuite/gcc.dg/Wrestrict-4.c +++ b/gcc/testsuite/gcc.dg/Wrestrict-4.c @@ -4,7 +4,7 @@ without a prototype don't cause an ICE. { dg-do compile } { dg-prune-output "conflicting types for built-in" } - { dg-options "-O2 -Warray-bounds -Wrestrict" } */ + { dg-options "-std=gnu17 -O2 -Warray-bounds -Wrestrict" } */ void* memcpy (); void* memmove (); diff --git a/gcc/testsuite/gcc.dg/Wrestrict-5.c b/gcc/testsuite/gcc.dg/Wrestrict-5.c index 4ea9176f1f51..00f942335b31 100644 --- a/gcc/testsuite/gcc.dg/Wrestrict-5.c +++ b/gcc/testsuite/gcc.dg/Wrestrict-5.c @@ -4,7 +4,7 @@ functions declared with no prototype are checked for overlap, and that invalid calls are ignored. { dg-do compile } - { dg-options "-O2 -fpermissive -Wrestrict" } */ + { dg-options "-std=gnu17 -O2 -fpermissive -Wrestrict" } */ void* memcpy (); char* strncpy (); diff --git a/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c b/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c index ae2db93c6127..260d20c9c9c3 100644 --- a/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c +++ b/gcc/testsuite/gcc.dg/Wstrict-overflow-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */ +/* { dg-options "-std=gnu17 -fstrict-overflow -O2 -Wstrict-overflow" } */ /* Don't warn about an overflow in a copied loop header. We used to get a warning in value numbering. This is PR 33565. */ diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c index 021eaae335d1..2c882909e7f8 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c @@ -3,7 +3,7 @@ PR middle-end/89911 - ICE on a call with no arguments to strnlen declared with no prototype { dg-do compile } - { dg-options "-O2 -fpermissive -Wall" } */ + { dg-options "-std=gnu17 -O2 -fpermissive -Wall" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/analyzer/doom-d_main-IdentifyVersion.c b/gcc/testsuite/gcc.dg/analyzer/doom-d_main-IdentifyVersion.c index 982b9b74349d..1605047c4231 100644 --- a/gcc/testsuite/gcc.dg/analyzer/doom-d_main-IdentifyVersion.c +++ b/gcc/testsuite/gcc.dg/analyzer/doom-d_main-IdentifyVersion.c @@ -1,6 +1,6 @@ /* Reduced from Doom's d_main.c, which is under the GPLv2 or later. */ -/* { dg-additional-options "-Wno-analyzer-too-complex" } */ +/* { dg-additional-options "-std=gnu17 -Wno-analyzer-too-complex" } */ typedef __SIZE_TYPE__ size_t; typedef struct _IO_FILE FILE; diff --git a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c index fdc21a2bec3d..ac0a789a7bbf 100644 --- a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c +++ b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c @@ -1,6 +1,6 @@ /* Reduced from Doom's linuxdoom-1.10/s_sound.c, which is GPLv2 or later. */ -/* { dg-additional-options "-fno-analyzer-call-summaries -Wno-analyzer-too-complex -Wno-analyzer-symbol-too-complex" } */ +/* { dg-additional-options "-std=gnu17 -fno-analyzer-call-summaries -Wno-analyzer-too-complex -Wno-analyzer-symbol-too-complex" } */ /* { dg-require-effective-target size32plus } */ typedef struct _IO_FILE FILE; diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c index 7a7320fca2b7..1941e49f9e85 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c @@ -4,7 +4,7 @@ removed. */ /* { dg-do "compile" } */ -/* { dg-additional-options "-fsigned-char" } */ +/* { dg-additional-options "-Wno-old-style-definition -fsigned-char" } */ /* { dg-require-effective-target int32plus } */ /* TODO (PR analyzer/112528): remove need for this. */ diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c index 108327571271..ca7ab132163d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c @@ -4,7 +4,7 @@ removed. */ /* { dg-do "compile" } */ -/* { dg-additional-options "-funsigned-char" } */ +/* { dg-additional-options "-Wno-old-style-definition -funsigned-char" } */ /* { dg-require-effective-target int32plus } */ /* TODO (PR analyzer/112528): remove need for this. */ diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93355-localealias.c b/gcc/testsuite/gcc.dg/analyzer/pr93355-localealias.c index 88d0fc1fe43f..4ccba46f8dac 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93355-localealias.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93355-localealias.c @@ -3,7 +3,7 @@ Adapted from intl/localealias.c, with all #includes removed. */ /* { dg-do "compile" } */ -/* { dg-additional-options "-Wno-analyzer-too-complex" } */ +/* { dg-additional-options "-Wno-old-style-definition -Wno-analyzer-too-complex" } */ /* TODO: remove the need for this option. */ /* { dg-require-effective-target alloca } */ diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93375.c b/gcc/testsuite/gcc.dg/analyzer/pr93375.c index f6108547fb7a..34ca68b6417b 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr93375.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr93375.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-Wno-implicit-int" } */ +/* { dg-additional-options "-std=gnu17 -Wno-implicit-int" } */ extern void foo (void *) __attribute__((nonnull)); diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94688.c b/gcc/testsuite/gcc.dg/analyzer/pr94688.c index 8ea8bc3b288b..06152d16f066 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr94688.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr94688.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-skip-if "PR112705" { hppa*64*-*-* } } */ int a, b; void d(); diff --git a/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c b/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c index c66af9276174..ee82bb682439 100644 --- a/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + #include /* Solaris needs this for to declare getpass. */ diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c index 4cbf43206dc3..f5329d843413 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c @@ -1,6 +1,6 @@ /* { dg-do compile { target x86_64-*-* } } */ /* { dg-require-effective-target lp64 } */ -/* { dg-additional-options "-fsanitize=bounds -fno-analyzer-call-summaries" } */ +/* { dg-additional-options "-std=gnu17 -fsanitize=bounds -fno-analyzer-call-summaries" } */ /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ /* Reduced from linux kernel: drivers/staging/wfx/sta.c (GPL-2.0) diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr104863.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr104863.c index 30ed4fe022d6..6487e966f37f 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/pr104863.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr104863.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-fanalyzer-transitivity" } */ +/* { dg-additional-options "-std=gnu17 -fanalyzer-transitivity" } */ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ extern void g(); diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr93379.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr93379.c index 01465cf60e10..6d6ac1433c8d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/pr93379.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr93379.c @@ -1,2 +1,3 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ #include "../../torture/pr57330.c" diff --git a/gcc/testsuite/gcc.dg/array-quals-2.c b/gcc/testsuite/gcc.dg/array-quals-2.c index 7f33e3fb2ce9..e49330d54a4d 100644 --- a/gcc/testsuite/gcc.dg/array-quals-2.c +++ b/gcc/testsuite/gcc.dg/array-quals-2.c @@ -3,7 +3,7 @@ lost in forming composite types. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "-pedantic -Wno-discarded-array-qualifiers" } */ +/* { dg-options "-std=gnu17 -pedantic -Wno-discarded-array-qualifiers" } */ typedef const char T[1]; typedef const char T2[1]; typedef volatile char U[1]; diff --git a/gcc/testsuite/gcc.dg/attr-invalid.c b/gcc/testsuite/gcc.dg/attr-invalid.c index a3315fa131b1..87f3cbcfa90a 100644 --- a/gcc/testsuite/gcc.dg/attr-invalid.c +++ b/gcc/testsuite/gcc.dg/attr-invalid.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ #define CONCAT_(A,B) A ## B #define CONCAT(A,B) CONCAT_(A,B) diff --git a/gcc/testsuite/gcc.dg/auto-init-uninit-A.c b/gcc/testsuite/gcc.dg/auto-init-uninit-A.c index 0ef1d92a7473..8347a6081e59 100644 --- a/gcc/testsuite/gcc.dg/auto-init-uninit-A.c +++ b/gcc/testsuite/gcc.dg/auto-init-uninit-A.c @@ -2,6 +2,6 @@ May be a real bug in CSE. */ /* { dg-do compile } */ -/* { dg-options "-O2 -Wall -ftrivial-auto-var-init=zero" } */ +/* { dg-options "-O2 -Wall -Wno-old-style-definition -ftrivial-auto-var-init=zero" } */ #include "uninit-A.c" diff --git a/gcc/testsuite/gcc.dg/builtin-choose-expr.c b/gcc/testsuite/gcc.dg/builtin-choose-expr.c index ceac6051f786..e8c14b4f4b77 100644 --- a/gcc/testsuite/gcc.dg/builtin-choose-expr.c +++ b/gcc/testsuite/gcc.dg/builtin-choose-expr.c @@ -35,7 +35,7 @@ extern void abort (); -extern void exit (); +extern void exit (int); void bad () { diff --git a/gcc/testsuite/gcc.dg/builtin-tgmath-err-1.c b/gcc/testsuite/gcc.dg/builtin-tgmath-err-1.c index 9016ec742bed..de764e3776ab 100644 --- a/gcc/testsuite/gcc.dg/builtin-tgmath-err-1.c +++ b/gcc/testsuite/gcc.dg/builtin-tgmath-err-1.c @@ -1,7 +1,7 @@ /* Test __builtin_tgmath: errors that indicate a bad definition of a type-generic macro rather than bad arguments in a call to it. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void *p; double d; diff --git a/gcc/testsuite/gcc.dg/builtins-30.c b/gcc/testsuite/gcc.dg/builtins-30.c index 37e5dba2db65..d6552e5bdcb3 100644 --- a/gcc/testsuite/gcc.dg/builtins-30.c +++ b/gcc/testsuite/gcc.dg/builtins-30.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Wall -Wshadow -fshow-column" } */ +/* { dg-options "-std=gnu17 -Wall -Wshadow -fshow-column" } */ extern double strtod (const char *, char **); #define UNUSED __attribute__ ((unused)) diff --git a/gcc/testsuite/gcc.dg/cast-function-1.c b/gcc/testsuite/gcc.dg/cast-function-1.c index 5228b5591659..4bd713611fe0 100644 --- a/gcc/testsuite/gcc.dg/cast-function-1.c +++ b/gcc/testsuite/gcc.dg/cast-function-1.c @@ -6,7 +6,7 @@ prototype than the actual one. */ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-options "-std=gnu17 -O3" } */ int foo1(int); int foo2(); diff --git a/gcc/testsuite/gcc.dg/cleanup-1.c b/gcc/testsuite/gcc.dg/cleanup-1.c index c622a62a4ade..22d590087c6c 100644 --- a/gcc/testsuite/gcc.dg/cleanup-1.c +++ b/gcc/testsuite/gcc.dg/cleanup-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -Wall" } */ +/* { dg-options "-std=gnu17 -fpermissive -Wall" } */ /* Validate expected warnings and errors. */ #define U __attribute__((unused)) diff --git a/gcc/testsuite/gcc.dg/compat/struct-complex-1_x.c b/gcc/testsuite/gcc.dg/compat/struct-complex-1_x.c index 0c6723948705..ff567a5dd9bd 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-complex-1_x.c +++ b/gcc/testsuite/gcc.dg/compat/struct-complex-1_x.c @@ -1,4 +1,4 @@ -/* { dg-options "-O -Wno-psabi" } */ +/* { dg-options "-std=gnu17 -O -Wno-psabi" } */ #ifdef __x86_64__ diff --git a/gcc/testsuite/gcc.dg/compat/struct-complex-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-complex-2_x.c index 2fb9826eb0f6..4ad5339ff912 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-complex-2_x.c +++ b/gcc/testsuite/gcc.dg/compat/struct-complex-2_x.c @@ -1,4 +1,4 @@ -/* { dg-options "-O -Wno-psabi" } */ +/* { dg-options "-std=gnu17 -O -Wno-psabi" } */ #ifdef __x86_64__ diff --git a/gcc/testsuite/gcc.dg/compat/union-m128-1_x.c b/gcc/testsuite/gcc.dg/compat/union-m128-1_x.c index 1f92303d95b1..13044bd9706e 100644 --- a/gcc/testsuite/gcc.dg/compat/union-m128-1_x.c +++ b/gcc/testsuite/gcc.dg/compat/union-m128-1_x.c @@ -1,4 +1,4 @@ -/* { dg-options "-O -msse2" } */ +/* { dg-options "-std=gnu17 -O -msse2" } */ #include "union-m128-1.h" diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c index 880791c72d43..81fac10b5bfb 100644 --- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -gdwarf" } */ +/* { dg-options "-std=gnu17 -O3 -gdwarf" } */ void f(int p) {} int g() { diff --git a/gcc/testsuite/gcc.dg/dfp/composite-type-2.c b/gcc/testsuite/gcc.dg/dfp/composite-type-2.c index 5c6d95cc200d..3ae8a245f246 100644 --- a/gcc/testsuite/gcc.dg/dfp/composite-type-2.c +++ b/gcc/testsuite/gcc.dg/dfp/composite-type-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -Wall -ftrack-macro-expansion=0" } */ +/* { dg-options "-std=gnu17 -O -Wall -ftrack-macro-expansion=0" } */ /* C99 6.2.7: Compatible type and composite type. */ diff --git a/gcc/testsuite/gcc.dg/dfp/composite-type.c b/gcc/testsuite/gcc.dg/dfp/composite-type.c index 2eb601400b59..ead335168d3b 100644 --- a/gcc/testsuite/gcc.dg/dfp/composite-type.c +++ b/gcc/testsuite/gcc.dg/dfp/composite-type.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -O -Wall -ftrack-macro-expansion=0" } */ +/* { dg-options "-std=gnu17 -fpermissive -O -Wall -ftrack-macro-expansion=0" } */ /* C99 6.2.7: Compatible type and composite type. */ diff --git a/gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c b/gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c index bca51066be37..5740e024fb21 100644 --- a/gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c +++ b/gcc/testsuite/gcc.dg/dfp/keywords-pedantic.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu17 -pedantic" } */ -/* Decimal float is a GCC extension. */ +/* Decimal float is a GCC extension before C23. */ _Decimal32 x; /* { dg-warning "GCC extension|ISO C" } */ _Decimal64 y; /* { dg-warning "GCC extension|ISO C" } */ diff --git a/gcc/testsuite/gcc.dg/dremf-type-compat-1.c b/gcc/testsuite/gcc.dg/dremf-type-compat-1.c index 79c55ef840c5..79e5d5b5d8cd 100644 --- a/gcc/testsuite/gcc.dg/dremf-type-compat-1.c +++ b/gcc/testsuite/gcc.dg/dremf-type-compat-1.c @@ -4,7 +4,7 @@ so it should be permitted when the function is built in. Bug 16666. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ float dremf (float, float); diff --git a/gcc/testsuite/gcc.dg/dremf-type-compat-2.c b/gcc/testsuite/gcc.dg/dremf-type-compat-2.c index 980ead187e73..ffb56a73b91c 100644 --- a/gcc/testsuite/gcc.dg/dremf-type-compat-2.c +++ b/gcc/testsuite/gcc.dg/dremf-type-compat-2.c @@ -5,7 +5,7 @@ 16666. Test with -pedantic, where the problem should still be diagnosed. */ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu17 -pedantic" } */ float dremf (float, float); /* { dg-warning "prototype declaration" } */ diff --git a/gcc/testsuite/gcc.dg/dremf-type-compat-3.c b/gcc/testsuite/gcc.dg/dremf-type-compat-3.c index 3934a64e19f2..ef36e0b6b121 100644 --- a/gcc/testsuite/gcc.dg/dremf-type-compat-3.c +++ b/gcc/testsuite/gcc.dg/dremf-type-compat-3.c @@ -5,7 +5,7 @@ 16666. Test with -pedantic-errors, where the problem should still be diagnosed. */ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ float dremf (float, float); /* { dg-error "prototype declaration" } */ diff --git a/gcc/testsuite/gcc.dg/dremf-type-compat-4.c b/gcc/testsuite/gcc.dg/dremf-type-compat-4.c index b3a2c5ad5d7b..27e2204ecff8 100644 --- a/gcc/testsuite/gcc.dg/dremf-type-compat-4.c +++ b/gcc/testsuite/gcc.dg/dremf-type-compat-4.c @@ -3,7 +3,7 @@ of old-style parameter declarations should only apply when the prototype is visible, not for a built-in prototype. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ float dremf(x, y) /* { dg-warning "conflicting types for built-in function 'dremf'" } */ diff --git a/gcc/testsuite/gcc.dg/enum-compat-1.c b/gcc/testsuite/gcc.dg/enum-compat-1.c index b7352f6ddc36..15890677b6dd 100644 --- a/gcc/testsuite/gcc.dg/enum-compat-1.c +++ b/gcc/testsuite/gcc.dg/enum-compat-1.c @@ -3,7 +3,7 @@ /* Origin: Joseph Myers , based on PR c/6024 from Richard Earnshaw */ /* { dg-do compile } */ -/* { dg-options "-fpermissive" } */ +/* { dg-options "-std=gnu17 -fpermissive" } */ /* Original test from PR c/6024. */ enum e1 {a, b}; diff --git a/gcc/testsuite/gcc.dg/enum-compat-2.c b/gcc/testsuite/gcc.dg/enum-compat-2.c index 695090124800..b42717e59391 100644 --- a/gcc/testsuite/gcc.dg/enum-compat-2.c +++ b/gcc/testsuite/gcc.dg/enum-compat-2.c @@ -3,7 +3,7 @@ /* Origin: Joseph Myers , based on PR c/6024 from Richard Earnshaw */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ /* Original test from PR c/6024. */ enum e1 {a, b}; diff --git a/gcc/testsuite/gcc.dg/floatn-errs.c b/gcc/testsuite/gcc.dg/floatn-errs.c index 0dcc2f1bb975..9fb3f90262c7 100644 --- a/gcc/testsuite/gcc.dg/floatn-errs.c +++ b/gcc/testsuite/gcc.dg/floatn-errs.c @@ -1,6 +1,6 @@ /* Tests for _FloatN / _FloatNx types: test erroneous code. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ /* { dg-add-options float32 } */ /* { dg-add-options float64 } */ /* { dg-add-options float32x } */ diff --git a/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c b/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c index 6ff3091ce6a8..b395fbdf7ca7 100644 --- a/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c +++ b/gcc/testsuite/gcc.dg/fltconst-pedantic-dfp.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu17 -pedantic" } */ double a = 1.dl; /* { dg-warning "decimal float" } */ /* { dg-error "not supported for this target" "not supported" { target { ! dfp } } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/format/proto.c b/gcc/testsuite/gcc.dg/format/proto.c index b2050c9de5bb..2556400b10c4 100644 --- a/gcc/testsuite/gcc.dg/format/proto.c +++ b/gcc/testsuite/gcc.dg/format/proto.c @@ -4,7 +4,7 @@ without a prototype. If it's decided that it shouldn't be the tests here will need to be adjusted. { dg-do compile } - { dg-options "-Wall" } */ + { dg-options "-std=gnu17 -Wall" } */ #define FMT(n1, n2) __attribute__((__format__(__printf__, n1, n2))) diff --git a/gcc/testsuite/gcc.dg/format/sentinel-1.c b/gcc/testsuite/gcc.dg/format/sentinel-1.c index 16c75a8a9612..d51289a1243e 100644 --- a/gcc/testsuite/gcc.dg/format/sentinel-1.c +++ b/gcc/testsuite/gcc.dg/format/sentinel-1.c @@ -1,7 +1,7 @@ /* Test for attribute sentinel. */ /* Origin: Kaveh Ghazi */ /* { dg-do compile } */ -/* { dg-options "-Wformat" } */ +/* { dg-options "-std=gnu17 -Wformat" } */ #include /* For NULL, which must be (ptr)0. */ diff --git a/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c b/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c index c8a99a8c7070..8fa12e3da360 100644 --- a/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c +++ b/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c @@ -1,5 +1,6 @@ /* Test parsing of #pragma omp declare simd */ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ #ifdef __aarch64__ #pragma omp declare simd uniform (a) aligned (b : 2 * sizeof (int)) \ diff --git a/gcc/testsuite/gcc.dg/ifelse-1.c b/gcc/testsuite/gcc.dg/ifelse-1.c index 2dd2208b01f7..cf111e25ef21 100644 --- a/gcc/testsuite/gcc.dg/ifelse-1.c +++ b/gcc/testsuite/gcc.dg/ifelse-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } -{ dg-options "-W -Wall" } +{ dg-options "-Wno-old-style-definition -W -Wall" } */ diff --git a/gcc/testsuite/gcc.dg/inline-33.c b/gcc/testsuite/gcc.dg/inline-33.c index 6ce3a5326b81..a8a409d0b775 100644 --- a/gcc/testsuite/gcc.dg/inline-33.c +++ b/gcc/testsuite/gcc.dg/inline-33.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fdump-tree-optimized" } */ +/* { dg-options "-std=gnu17 -O3 -fdump-tree-optimized" } */ /* { dg-add-options bind_pic_locally } */ int i; diff --git a/gcc/testsuite/gcc.dg/ipa/inline-5.c b/gcc/testsuite/gcc.dg/ipa/inline-5.c index 390ba499d673..cef871cc7136 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-5.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-5.c @@ -1,6 +1,6 @@ /* Check statements that are eliminated by inlining. */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-fnsummary-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ +/* { dg-options "-std=gnu17 -O2 -fdump-ipa-fnsummary-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ struct a {int a,b,c,d,e;}; void t(int); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-21.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-21.c index 67806b866fee..17c1398a11a8 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-21.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-21.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ typedef int a; typedef int b; diff --git a/gcc/testsuite/gcc.dg/ipa/pr102714.c b/gcc/testsuite/gcc.dg/ipa/pr102714.c index 8ab77a61d75b..c93496d0ef59 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr102714.c +++ b/gcc/testsuite/gcc.dg/ipa/pr102714.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-strict-aliasing -fdump-ipa-sra-details -fdump-tree-optimized" } */ +/* { dg-options "-std=gnu17 -O2 -fno-strict-aliasing -fdump-ipa-sra-details -fdump-tree-optimized" } */ typedef _Bool bool; diff --git a/gcc/testsuite/gcc.dg/ipa/pr104813.c b/gcc/testsuite/gcc.dg/ipa/pr104813.c index 34f413e38230..13e1e06c597e 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr104813.c +++ b/gcc/testsuite/gcc.dg/ipa/pr104813.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-options "-std=gnu17 -O3" } */ int a, b, c, d, *e; void f(int h) { diff --git a/gcc/testsuite/gcc.dg/ipa/pr108679.c b/gcc/testsuite/gcc.dg/ipa/pr108679.c index b1ed50bb831a..714cdab653a3 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr108679.c +++ b/gcc/testsuite/gcc.dg/ipa/pr108679.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ struct S1 { signed f0; diff --git a/gcc/testsuite/gcc.dg/ipa/pr42706.c b/gcc/testsuite/gcc.dg/ipa/pr42706.c index 9c5f43af36fb..0cb7d512cfba 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr42706.c +++ b/gcc/testsuite/gcc.dg/ipa/pr42706.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-early-inlining -fipa-sra" } */ +/* { dg-options "-std=gnu17 -O2 -fno-early-inlining -fipa-sra" } */ struct S { diff --git a/gcc/testsuite/gcc.dg/ipa/pr88214.c b/gcc/testsuite/gcc.dg/ipa/pr88214.c index 4daa9829e75f..c621796c1409 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr88214.c +++ b/gcc/testsuite/gcc.dg/ipa/pr88214.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-Wno-old-style-definition -O2" } */ void i(); short a; diff --git a/gcc/testsuite/gcc.dg/ipa/pr91853.c b/gcc/testsuite/gcc.dg/ipa/pr91853.c index 4bad78037512..446096894f4e 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr91853.c +++ b/gcc/testsuite/gcc.dg/ipa/pr91853.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "--param ipa-cp-value-list-size=0 -Os -fno-inline" } */ +/* { dg-options "-Wno-old-style-definition --param ipa-cp-value-list-size=0 -Os -fno-inline" } */ struct _wincore { diff --git a/gcc/testsuite/gcc.dg/ipa/pr93763.c b/gcc/testsuite/gcc.dg/ipa/pr93763.c index aa2e60c5fc70..6aa4c6ea45ee 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr93763.c +++ b/gcc/testsuite/gcc.dg/ipa/pr93763.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-options "-std=gnu17 -O3" } */ typedef struct a a; struct a { diff --git a/gcc/testsuite/gcc.dg/ipa/pr96482-2.c b/gcc/testsuite/gcc.dg/ipa/pr96482-2.c index 54b71ac4fc01..77c34e527269 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr96482-2.c +++ b/gcc/testsuite/gcc.dg/ipa/pr96482-2.c @@ -1,6 +1,6 @@ /* PR ipa/96482 */ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ int i2c_transfer(); void _dev_err(); diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c index 89caea868e6e..283aedb13471 100644 --- a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c +++ b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c @@ -1,4 +1,4 @@ -/* { dg-options "-Wno-stringop-overread" } */ +/* { dg-options "-std=gnu17 -Wno-stringop-overread" } */ typedef struct HDC__ { int unused; } *HDC; typedef struct HFONT__ { int unused; } *HFONT; diff --git a/gcc/testsuite/gcc.dg/lto/20091015-1_2.c b/gcc/testsuite/gcc.dg/lto/20091015-1_2.c index 0bc940bc1b19..6fb7002fce9d 100644 --- a/gcc/testsuite/gcc.dg/lto/20091015-1_2.c +++ b/gcc/testsuite/gcc.dg/lto/20091015-1_2.c @@ -1,3 +1,4 @@ +/* { dg-options "-std=gnu17" } */ #include "20091015-1_a.h" #include "20091015-1_b.h" void foo (); diff --git a/gcc/testsuite/gcc.dg/lto/pr113197_1.c b/gcc/testsuite/gcc.dg/lto/pr113197_1.c index 30bf6f7e7c5d..000f8422ec44 100644 --- a/gcc/testsuite/gcc.dg/lto/pr113197_1.c +++ b/gcc/testsuite/gcc.dg/lto/pr113197_1.c @@ -1,3 +1,4 @@ +/* { dg-options "-std=gnu17" } */ int a; void exit_error(); void register_dccp() { exit_error(a); } diff --git a/gcc/testsuite/gcc.dg/lto/pr54702_1.c b/gcc/testsuite/gcc.dg/lto/pr54702_1.c index c304682e92ff..7adc6a374195 100644 --- a/gcc/testsuite/gcc.dg/lto/pr54702_1.c +++ b/gcc/testsuite/gcc.dg/lto/pr54702_1.c @@ -1,4 +1,4 @@ -/* { dg-options "-fpermissive" } */ +/* { dg-options "-std=gnu17 -fpermissive" } */ int *b; void *d; int c; diff --git a/gcc/testsuite/gcc.dg/lto/pr99849_0.c b/gcc/testsuite/gcc.dg/lto/pr99849_0.c index d489cee0f527..5c97a7c75a23 100644 --- a/gcc/testsuite/gcc.dg/lto/pr99849_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr99849_0.c @@ -3,7 +3,7 @@ /* { dg-require-effective-target fpic } */ /* { dg-require-effective-target shared } */ /* { dg-extra-ld-options { -shared } } */ -/* { dg-lto-options { { -flto -flto-partition=1to1 -O2 -Wno-incompatible-pointer-types -Wno-discarded-qualifiers -fPIC } } } */ +/* { dg-lto-options { { -std=gnu17 -flto -flto-partition=1to1 -O2 -Wno-incompatible-pointer-types -Wno-discarded-qualifiers -fPIC } } } */ struct { struct A *a; } *b; struct B { int *b; }; diff --git a/gcc/testsuite/gcc.dg/noncompile/920923-1.c b/gcc/testsuite/gcc.dg/noncompile/920923-1.c index 006a07131f9c..957fea2db658 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920923-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/920923-1.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-message "undeclared identifier is reported only once" "reminder for mmu_base" { target *-*-* } 0 } */ typedef BYTE unsigned char; /* { dg-error "expected" } */ /* { dg-warning "useless type name in empty declaration" "" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-1.c b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-1.c index 5f879c3f0aed..cf14acdfa13c 100644 --- a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-1.c @@ -2,7 +2,7 @@ accepted. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ void f(a) diff --git a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-3.c b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-3.c index f9d6d0f686a8..6c276cae2f90 100644 --- a/gcc/testsuite/gcc.dg/noncompile/old-style-parm-3.c +++ b/gcc/testsuite/gcc.dg/noncompile/old-style-parm-3.c @@ -1,5 +1,6 @@ /* PR c/71266 */ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ int fn1 (a) enum b { /* { dg-warning "empty declaration" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/pr30552-2.c b/gcc/testsuite/gcc.dg/noncompile/pr30552-2.c index d88488397c6d..8351f5d8ed84 100644 --- a/gcc/testsuite/gcc.dg/noncompile/pr30552-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/pr30552-2.c @@ -5,7 +5,7 @@ * internal compiler error. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ int main() { diff --git a/gcc/testsuite/gcc.dg/noncompile/pr30552-3.c b/gcc/testsuite/gcc.dg/noncompile/pr30552-3.c index 23cc7e6b2534..0e747be1367d 100644 --- a/gcc/testsuite/gcc.dg/noncompile/pr30552-3.c +++ b/gcc/testsuite/gcc.dg/noncompile/pr30552-3.c @@ -5,7 +5,7 @@ * user error, not internal compiler error. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ int main() { diff --git a/gcc/testsuite/gcc.dg/noncompile/pr71265.c b/gcc/testsuite/gcc.dg/noncompile/pr71265.c index 9c62aab12334..69507b5ade72 100644 --- a/gcc/testsuite/gcc.dg/noncompile/pr71265.c +++ b/gcc/testsuite/gcc.dg/noncompile/pr71265.c @@ -1,5 +1,6 @@ /* PR c/71265 */ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ void ID (ID) int ID [__func__]; /* { dg-error "size of array .ID. has non-integer type" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/pr79758-2.c b/gcc/testsuite/gcc.dg/noncompile/pr79758-2.c index e6a27f952ef8..2e5323feb31f 100644 --- a/gcc/testsuite/gcc.dg/noncompile/pr79758-2.c +++ b/gcc/testsuite/gcc.dg/noncompile/pr79758-2.c @@ -1,5 +1,6 @@ /* PR c/79758 */ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ void fn1 (int[a]) { }; /* { dg-error "undeclared here" } */ void fn1 (b) { }; /* { dg-error "redefinition" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/pr79758.c b/gcc/testsuite/gcc.dg/noncompile/pr79758.c index e42a44380fa6..eab49250d42a 100644 --- a/gcc/testsuite/gcc.dg/noncompile/pr79758.c +++ b/gcc/testsuite/gcc.dg/noncompile/pr79758.c @@ -1,6 +1,6 @@ /* PR c/79758 */ /* { dg-do compile } */ -/* { dg-additional-options "-fpermissive" } */ +/* { dg-additional-options "-Wno-old-style-definition -fpermissive" } */ void fn1 (int[a]) { }; /* { dg-error "undeclared here" } */ void fn1 (b) { }; /* { dg-error "redefinition" } */ diff --git a/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c index f36a492e53d4..3a335364ef3e 100644 --- a/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + #include void diff --git a/gcc/testsuite/gcc.dg/old-style-prom-1.c b/gcc/testsuite/gcc.dg/old-style-prom-1.c index 165ff9827086..f9b41397f84d 100644 --- a/gcc/testsuite/gcc.dg/old-style-prom-1.c +++ b/gcc/testsuite/gcc.dg/old-style-prom-1.c @@ -1,7 +1,7 @@ /* Test for prototype followed by old-style definition, as in dremf-type-compat-1.c but with a non-built-in function. */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ float f (float, float); diff --git a/gcc/testsuite/gcc.dg/old-style-prom-2.c b/gcc/testsuite/gcc.dg/old-style-prom-2.c index e7e690e14175..4a1283b668d7 100644 --- a/gcc/testsuite/gcc.dg/old-style-prom-2.c +++ b/gcc/testsuite/gcc.dg/old-style-prom-2.c @@ -1,7 +1,7 @@ /* Test for prototype followed by old-style definition, as in dremf-type-compat-2.c but with a non-built-in function. */ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu17 -pedantic" } */ float f (float, float); /* { dg-warning "prototype declaration" } */ diff --git a/gcc/testsuite/gcc.dg/old-style-prom-3.c b/gcc/testsuite/gcc.dg/old-style-prom-3.c index 720367f2e330..e84b39b90f25 100644 --- a/gcc/testsuite/gcc.dg/old-style-prom-3.c +++ b/gcc/testsuite/gcc.dg/old-style-prom-3.c @@ -1,7 +1,7 @@ /* Test for prototype followed by old-style definition, as in dremf-type-compat-3.c but with a non-built-in function. */ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ float f (float, float); /* { dg-error "prototype declaration" } */ diff --git a/gcc/testsuite/gcc.dg/old-style-then-proto-1.c b/gcc/testsuite/gcc.dg/old-style-then-proto-1.c index e3e61861673a..d09e76ec6ee8 100644 --- a/gcc/testsuite/gcc.dg/old-style-then-proto-1.c +++ b/gcc/testsuite/gcc.dg/old-style-then-proto-1.c @@ -2,7 +2,7 @@ Mismatched qualifiers used to be wrongly forbidden. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void f1() {} void f1(void); /* { dg-warning "prototype for 'f1' follows non-prototype definition" } */ diff --git a/gcc/testsuite/gcc.dg/parm-incomplete-1.c b/gcc/testsuite/gcc.dg/parm-incomplete-1.c index 02d97b933f42..0c0ae85d86fa 100644 --- a/gcc/testsuite/gcc.dg/parm-incomplete-1.c +++ b/gcc/testsuite/gcc.dg/parm-incomplete-1.c @@ -6,7 +6,7 @@ C99 6.7.5.3); the precise rules are unclear. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ struct s; void f (struct s); diff --git a/gcc/testsuite/gcc.dg/parm-mismatch-1.c b/gcc/testsuite/gcc.dg/parm-mismatch-1.c index d7621bcd6b2b..2136f723ad5f 100644 --- a/gcc/testsuite/gcc.dg/parm-mismatch-1.c +++ b/gcc/testsuite/gcc.dg/parm-mismatch-1.c @@ -2,7 +2,7 @@ (). */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void f0(); /* { dg-message "note: previous declaration of 'f0'" "note" } */ void f0(int, ...); /* { dg-error "conflicting types for 'f0'" } */ diff --git a/gcc/testsuite/gcc.dg/permerror-default.c b/gcc/testsuite/gcc.dg/permerror-default.c index c674d6890819..b321a7d6a205 100644 --- a/gcc/testsuite/gcc.dg/permerror-default.c +++ b/gcc/testsuite/gcc.dg/permerror-default.c @@ -1,4 +1,4 @@ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ /* Overview test for C permerrors. This test should be kept in sync with the other permerror-* tests. If new permerrors are added, test cases should be diff --git a/gcc/testsuite/gcc.dg/permerror-fpermissive-nowarning.c b/gcc/testsuite/gcc.dg/permerror-fpermissive-nowarning.c index d07c86366776..19629fc952f0 100644 --- a/gcc/testsuite/gcc.dg/permerror-fpermissive-nowarning.c +++ b/gcc/testsuite/gcc.dg/permerror-fpermissive-nowarning.c @@ -1,4 +1,4 @@ -/* { dg-options "-fpermissive -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types -Wno-return-mismatch -Wno-declaration-missing-parameter-type" } */ +/* { dg-options "-std=gnu17 -fpermissive -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types -Wno-return-mismatch -Wno-declaration-missing-parameter-type" } */ /* This test checks that permerrors can be disabled using -Wno-* options even if -fpermissive is used. */ diff --git a/gcc/testsuite/gcc.dg/permerror-fpermissive.c b/gcc/testsuite/gcc.dg/permerror-fpermissive.c index fd3020d75eed..46a820016203 100644 --- a/gcc/testsuite/gcc.dg/permerror-fpermissive.c +++ b/gcc/testsuite/gcc.dg/permerror-fpermissive.c @@ -1,4 +1,4 @@ -/* { dg-options "-fpermissive" } */ +/* { dg-options "-std=gnu17 -fpermissive" } */ /* Overview test for C permerrors. This test should be kept in sync with the other permerror-* tests. If new permerrors are added, test cases should be diff --git a/gcc/testsuite/gcc.dg/permerror-noerror.c b/gcc/testsuite/gcc.dg/permerror-noerror.c index fc68dfa8bb96..614fb06d6e00 100644 --- a/gcc/testsuite/gcc.dg/permerror-noerror.c +++ b/gcc/testsuite/gcc.dg/permerror-noerror.c @@ -1,4 +1,4 @@ -/* { dg-options "-Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -Wno-error=return-mismatch -Wno-error=declaration-missing-parameter-type" } */ +/* { dg-options "-std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -Wno-error=return-mismatch -Wno-error=declaration-missing-parameter-type" } */ /* This test should emulate the effect of -fpermissive by adding all the -Wno-error= options that are implied by -fpermissive. It needs to be diff --git a/gcc/testsuite/gcc.dg/permerror-nowarning.c b/gcc/testsuite/gcc.dg/permerror-nowarning.c index b1cf79901272..3182a2474b03 100644 --- a/gcc/testsuite/gcc.dg/permerror-nowarning.c +++ b/gcc/testsuite/gcc.dg/permerror-nowarning.c @@ -1,4 +1,4 @@ -/* { dg-options "-Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types -Wno-return-mismatch -Wno-declaration-missing-parameter-type" } */ +/* { dg-options "-std=gnu17 -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types -Wno-return-mismatch -Wno-declaration-missing-parameter-type" } */ /* This test checks that permerrors can be disabled using -Wno-* options. */ diff --git a/gcc/testsuite/gcc.dg/permerror-pedantic.c b/gcc/testsuite/gcc.dg/permerror-pedantic.c index 2380bb2583ce..11fa83a8f78d 100644 --- a/gcc/testsuite/gcc.dg/permerror-pedantic.c +++ b/gcc/testsuite/gcc.dg/permerror-pedantic.c @@ -1,4 +1,4 @@ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ /* Overview test for C permerrors. This test should be kept in sync with the other permerror-* tests. If new permerrors are added, test cases should be diff --git a/gcc/testsuite/gcc.dg/plugin/infoleak-net-ethtool-ioctl.c b/gcc/testsuite/gcc.dg/plugin/infoleak-net-ethtool-ioctl.c index dce6e44ae130..52846c40f863 100644 --- a/gcc/testsuite/gcc.dg/plugin/infoleak-net-ethtool-ioctl.c +++ b/gcc/testsuite/gcc.dg/plugin/infoleak-net-ethtool-ioctl.c @@ -2,7 +2,7 @@ net/ethtool/ioctl.c */ /* { dg-do compile } */ -/* { dg-options "-fanalyzer" } */ +/* { dg-options "-std=gnu17 -fanalyzer" } */ /* { dg-require-effective-target analyzer } */ typedef signed char __s8; diff --git a/gcc/testsuite/gcc.dg/pointer-array-quals-1.c b/gcc/testsuite/gcc.dg/pointer-array-quals-1.c index be80912723a0..36398ef96f04 100644 --- a/gcc/testsuite/gcc.dg/pointer-array-quals-1.c +++ b/gcc/testsuite/gcc.dg/pointer-array-quals-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* Origin: Martin Uecker */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void tvoid(void* x); void transpose0(double* out, const double* in) { } void transpose1(double out[2][2], const double in[2][2]) { } diff --git a/gcc/testsuite/gcc.dg/pointer-array-quals-2.c b/gcc/testsuite/gcc.dg/pointer-array-quals-2.c index 4c95d8a3a785..32adf79bb7d2 100644 --- a/gcc/testsuite/gcc.dg/pointer-array-quals-2.c +++ b/gcc/testsuite/gcc.dg/pointer-array-quals-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-std=gnu17 -pedantic-errors" } */ /* Origin: Martin Uecker */ void tvoid(void* x); void transpose0(double* out, const double* in) { } diff --git a/gcc/testsuite/gcc.dg/pr100791.c b/gcc/testsuite/gcc.dg/pr100791.c index 00cc4b185a32..f0e7da508dea 100644 --- a/gcc/testsuite/gcc.dg/pr100791.c +++ b/gcc/testsuite/gcc.dg/pr100791.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive" } */ +/* { dg-options "-std=gnu17 -fpermissive" } */ static inline int __attribute__((__always_inline__)) foo () diff --git a/gcc/testsuite/gcc.dg/pr100843.c b/gcc/testsuite/gcc.dg/pr100843.c index 695a2ec3f681..a8ecb5a0c852 100644 --- a/gcc/testsuite/gcc.dg/pr100843.c +++ b/gcc/testsuite/gcc.dg/pr100843.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -w" } */ +/* { dg-options "-std=gnu17 -O1 -w" } */ char c; void *memset(); diff --git a/gcc/testsuite/gcc.dg/pr102273.c b/gcc/testsuite/gcc.dg/pr102273.c index 568e44ebfefd..2cb396edc817 100644 --- a/gcc/testsuite/gcc.dg/pr102273.c +++ b/gcc/testsuite/gcc.dg/pr102273.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-ftrivial-auto-var-init=zero" } */ +/* { dg-options "-std=gnu17 -ftrivial-auto-var-init=zero" } */ void bar(); diff --git a/gcc/testsuite/gcc.dg/pr102385.c b/gcc/testsuite/gcc.dg/pr102385.c index bdccc9e43b14..f64017ef90cb 100644 --- a/gcc/testsuite/gcc.dg/pr102385.c +++ b/gcc/testsuite/gcc.dg/pr102385.c @@ -1,4 +1,4 @@ -/* { dg-options "-Wall -Wextra -O2 -fno-toplevel-reorder -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-loop-ivcanon -fpredictive-commoning -fdump-tree-pcom-details-blocks -fdump-tree-lim-details-blocks" } */ +/* { dg-options "-std=gnu17 -Wall -Wextra -O2 -fno-toplevel-reorder -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-loop-ivcanon -fpredictive-commoning -fdump-tree-pcom-details-blocks -fdump-tree-lim-details-blocks" } */ short a, b; int c[9]; diff --git a/gcc/testsuite/gcc.dg/pr103222.c b/gcc/testsuite/gcc.dg/pr103222.c index 2a84437b25d6..9b629f2fc91d 100644 --- a/gcc/testsuite/gcc.dg/pr103222.c +++ b/gcc/testsuite/gcc.dg/pr103222.c @@ -1,5 +1,5 @@ // { dg-do run } -// { dg-options "-O2" } +// { dg-options "-std=gnu17 -O2" } #include #include diff --git a/gcc/testsuite/gcc.dg/pr105140.c b/gcc/testsuite/gcc.dg/pr105140.c index 173dc8c2fac8..32267f04f387 100644 --- a/gcc/testsuite/gcc.dg/pr105140.c +++ b/gcc/testsuite/gcc.dg/pr105140.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -Os -w -Wno-psabi" } */ +/* { dg-options "-std=gnu17 -fpermissive -Os -w -Wno-psabi" } */ /* { dg-skip-if "PR105147" { powerpc*-*-* s390*-*-* } } */ typedef char __attribute__((__vector_size__ (16 * sizeof (char)))) U; diff --git a/gcc/testsuite/gcc.dg/pr105150.c b/gcc/testsuite/gcc.dg/pr105150.c index 900460c1555c..b8c35c083082 100644 --- a/gcc/testsuite/gcc.dg/pr105150.c +++ b/gcc/testsuite/gcc.dg/pr105150.c @@ -1,5 +1,5 @@ /* PR tree-optimization/105150 */ -/* { dg-options "-w -Ofast" } */ +/* { dg-options "-std=gnu17 -w -Ofast" } */ #define A(name) __typeof (__builtin_##name (0)) name (); \ float name##1 () { return !name (1); } \ diff --git a/gcc/testsuite/gcc.dg/pr105250.c b/gcc/testsuite/gcc.dg/pr105250.c index c4f4ea0c3d7f..ba3b0dd930fd 100644 --- a/gcc/testsuite/gcc.dg/pr105250.c +++ b/gcc/testsuite/gcc.dg/pr105250.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fpermissive -w -Wno-psabi -O2" } */ +/* { dg-options "-std=gnu17 -fpermissive -w -Wno-psabi -O2" } */ /* { dg-skip-if "PR105266" { powerpc*-*-* s390*-*-* } } */ typedef int __attribute__((__vector_size__(4))) T; diff --git a/gcc/testsuite/gcc.dg/pr105972.c b/gcc/testsuite/gcc.dg/pr105972.c index 73f3385f7eba..93518f60f7fb 100644 --- a/gcc/testsuite/gcc.dg/pr105972.c +++ b/gcc/testsuite/gcc.dg/pr105972.c @@ -1,6 +1,6 @@ /* PR c/105972 */ /* { dg-do compile } */ -/* { dg-options "-O2 -g" } */ +/* { dg-options "-Wno-old-style-definition -O2 -g" } */ __attribute__((optimize (0))) int foo (void) diff --git a/gcc/testsuite/gcc.dg/pr111039.c b/gcc/testsuite/gcc.dg/pr111039.c index a64c46c7edcd..0ba142b0a59e 100644 --- a/gcc/testsuite/gcc.dg/pr111039.c +++ b/gcc/testsuite/gcc.dg/pr111039.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O" } */ +/* { dg-options "-std=gnu17 -O" } */ #if __SIZEOF_INT__ < 4 #define int __INT32_TYPE__ diff --git a/gcc/testsuite/gcc.dg/pr111407.c b/gcc/testsuite/gcc.dg/pr111407.c index a171074753f9..211e19f899f2 100644 --- a/gcc/testsuite/gcc.dg/pr111407.c +++ b/gcc/testsuite/gcc.dg/pr111407.c @@ -1,6 +1,6 @@ /* PR tree-optimization/111407*/ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ enum { SEND_TOFILE } __sigsetjmp(); void fclose(); void foldergets(); diff --git a/gcc/testsuite/gcc.dg/pr111922.c b/gcc/testsuite/gcc.dg/pr111922.c index 4f429d741c76..7201c0ef2153 100644 --- a/gcc/testsuite/gcc.dg/pr111922.c +++ b/gcc/testsuite/gcc.dg/pr111922.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-tree-fre" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fno-tree-fre" } */ void f2 (void); void f4 (int, int, int); diff --git a/gcc/testsuite/gcc.dg/pr15236.c b/gcc/testsuite/gcc.dg/pr15236.c index b01a4e858732..9b92489738da 100644 --- a/gcc/testsuite/gcc.dg/pr15236.c +++ b/gcc/testsuite/gcc.dg/pr15236.c @@ -1,7 +1,7 @@ /* PR 15236: pedantic switch modifies treatment of non-ISO compliant enumerations. */ /* { dg-do compile } */ -/* { dg-options "-Wall -Wextra -pedantic-errors -Wconversion" } */ +/* { dg-options "-std=gnu17 -Wall -Wextra -pedantic-errors -Wconversion" } */ typedef enum OMX_ERRORTYPE { OMX_ErrorNone = 0, diff --git a/gcc/testsuite/gcc.dg/pr17188-1.c b/gcc/testsuite/gcc.dg/pr17188-1.c index 522a14f7d75f..142f42acdac1 100644 --- a/gcc/testsuite/gcc.dg/pr17188-1.c +++ b/gcc/testsuite/gcc.dg/pr17188-1.c @@ -3,7 +3,7 @@ diagnosed. Bug 17188. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ struct s0 { }; /* { dg-message "note: originally defined here" } */ struct s0; diff --git a/gcc/testsuite/gcc.dg/pr20368-1.c b/gcc/testsuite/gcc.dg/pr20368-1.c index 4140397c1427..2959328e6a6c 100644 --- a/gcc/testsuite/gcc.dg/pr20368-1.c +++ b/gcc/testsuite/gcc.dg/pr20368-1.c @@ -1,7 +1,7 @@ /* ICE with -Wstrict-prototypes and typeof an undeclared function. Bug 20368. */ /* { dg-do compile } */ -/* { dg-options "-Wstrict-prototypes" } */ +/* { dg-options "-std=gnu17 -Wstrict-prototypes" } */ extern __typeof (f) g; /* { dg-error "'f' undeclared here \\(not in a function\\)" } */ diff --git a/gcc/testsuite/gcc.dg/pr20368-2.c b/gcc/testsuite/gcc.dg/pr20368-2.c index 7faded6bd8cf..3ca5f6363a32 100644 --- a/gcc/testsuite/gcc.dg/pr20368-2.c +++ b/gcc/testsuite/gcc.dg/pr20368-2.c @@ -1,7 +1,7 @@ /* ICE with -Wstrict-prototypes and typeof an undeclared function. Bug 20368. Test with -Wmissing-prototypes. */ /* { dg-do compile } */ -/* { dg-options "-Wmissing-prototypes" } */ +/* { dg-options "-std=gnu17 -Wmissing-prototypes" } */ extern __typeof (f) g; /* { dg-error "'f' undeclared here \\(not in a function\\)" } */ diff --git a/gcc/testsuite/gcc.dg/pr20368-3.c b/gcc/testsuite/gcc.dg/pr20368-3.c index 0d0ea6dfcc33..e3b5194efa06 100644 --- a/gcc/testsuite/gcc.dg/pr20368-3.c +++ b/gcc/testsuite/gcc.dg/pr20368-3.c @@ -1,7 +1,7 @@ /* ICE with -Wstrict-prototypes and typeof an undeclared function. Bug 20368. Test with -Wmissing-declarations. */ /* { dg-do compile } */ -/* { dg-options "-Wmissing-declarations" } */ +/* { dg-options "-std=gnu17 -Wmissing-declarations" } */ extern __typeof (f) g; /* { dg-error "'f' undeclared here \\(not in a function\\)" } */ diff --git a/gcc/testsuite/gcc.dg/pr27331.c b/gcc/testsuite/gcc.dg/pr27331.c index 9b5c71e84376..50ec9a1f6251 100644 --- a/gcc/testsuite/gcc.dg/pr27331.c +++ b/gcc/testsuite/gcc.dg/pr27331.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -ftree-vectorize" } */ +/* { dg-options "-Wno-old-style-definition -O2 -ftree-vectorize" } */ struct funny_match { diff --git a/gcc/testsuite/gcc.dg/pr27861-1.c b/gcc/testsuite/gcc.dg/pr27861-1.c index 8d6d791bcacc..e8f86f289ca1 100644 --- a/gcc/testsuite/gcc.dg/pr27861-1.c +++ b/gcc/testsuite/gcc.dg/pr27861-1.c @@ -4,7 +4,7 @@ later producing a VAR_DECL tree whose DECL_RTL's mode didn't match the VAR_DECL's type's mode. */ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ typedef struct sim_state *SIM_DESC; typedef enum diff --git a/gcc/testsuite/gcc.dg/pr28121.c b/gcc/testsuite/gcc.dg/pr28121.c index 9e306f5930a5..93d065fc2c32 100644 --- a/gcc/testsuite/gcc.dg/pr28121.c +++ b/gcc/testsuite/gcc.dg/pr28121.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ int GetMouseButton (); int ParsePos (); diff --git a/gcc/testsuite/gcc.dg/pr28243.c b/gcc/testsuite/gcc.dg/pr28243.c index a6d693e224ca..fd08b9926fd3 100644 --- a/gcc/testsuite/gcc.dg/pr28243.c +++ b/gcc/testsuite/gcc.dg/pr28243.c @@ -3,7 +3,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target fpic } */ -/* { dg-options "-O2 -ftracer -fPIC" } */ +/* { dg-options "-std=gnu17 -O2 -ftracer -fPIC" } */ struct displayfuncs { void (*init) (); diff --git a/gcc/testsuite/gcc.dg/pr28888.c b/gcc/testsuite/gcc.dg/pr28888.c index 3bad18b9fdf6..dea52f1b269d 100644 --- a/gcc/testsuite/gcc.dg/pr28888.c +++ b/gcc/testsuite/gcc.dg/pr28888.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -ftree-vectorize" } */ +/* { dg-options "-std=gnu17 -O2 -ftree-vectorize" } */ static const unsigned char _c30[] = "statistic of allocated integer registers:"; diff --git a/gcc/testsuite/gcc.dg/pr29254.c b/gcc/testsuite/gcc.dg/pr29254.c index df6ba574a5db..1770a9710b75 100644 --- a/gcc/testsuite/gcc.dg/pr29254.c +++ b/gcc/testsuite/gcc.dg/pr29254.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -Werror" } */ +/* { dg-options "-std=gnu17 -O3 -Werror" } */ int value_compare (); diff --git a/gcc/testsuite/gcc.dg/pr34457-1.c b/gcc/testsuite/gcc.dg/pr34457-1.c index 3dca13df0933..ef2419f45359 100644 --- a/gcc/testsuite/gcc.dg/pr34457-1.c +++ b/gcc/testsuite/gcc.dg/pr34457-1.c @@ -2,7 +2,7 @@ /* { dg-do link } */ /* { dg-require-effective-target trampolines } */ /* { dg-require-effective-target lto } */ -/* { dg-options "-flto -O2" } */ +/* { dg-options "-std=gnu17 -flto -O2" } */ /* { dg-additional-sources "pr34457-2.c" } */ diff --git a/gcc/testsuite/gcc.dg/pr36015.c b/gcc/testsuite/gcc.dg/pr36015.c index fc31535598d0..85b441c63c10 100644 --- a/gcc/testsuite/gcc.dg/pr36015.c +++ b/gcc/testsuite/gcc.dg/pr36015.c @@ -1,7 +1,7 @@ /* PR target/36015 */ /* { dg-do run } */ -/* { dg-options "-O0" } */ -/* { dg-options "-O0 -mregparm=3" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ +/* { dg-options "-std=gnu17 -O0" } */ +/* { dg-options "-std=gnu17 -O0 -mregparm=3" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ static int test (); diff --git a/gcc/testsuite/gcc.dg/pr38245-3.c b/gcc/testsuite/gcc.dg/pr38245-3.c index 6ef8372a14f2..ae687c68efa1 100644 --- a/gcc/testsuite/gcc.dg/pr38245-3.c +++ b/gcc/testsuite/gcc.dg/pr38245-3.c @@ -1,7 +1,7 @@ /* PR rtl-optimization/38245 */ /* { dg-do run } */ /* { dg-additional-sources "pr38245-4.c" } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ #include "pr38245-3.h" diff --git a/gcc/testsuite/gcc.dg/pr38245-4.c b/gcc/testsuite/gcc.dg/pr38245-4.c index c9b3d2d8fb81..7b63b989ffad 100644 --- a/gcc/testsuite/gcc.dg/pr38245-4.c +++ b/gcc/testsuite/gcc.dg/pr38245-4.c @@ -1,6 +1,6 @@ /* PR rtl-optimization/38245 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ #include "pr38245-3.h" diff --git a/gcc/testsuite/gcc.dg/pr41241.c b/gcc/testsuite/gcc.dg/pr41241.c index 42fb2f7e5c7a..5364a0a5935b 100644 --- a/gcc/testsuite/gcc.dg/pr41241.c +++ b/gcc/testsuite/gcc.dg/pr41241.c @@ -1,7 +1,7 @@ /* PR bootstrap/41241 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fcompare-debug -g" } */ -/* { dg-options "-O2 -fcompare-debug -g -march=i586 -mtune=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ +/* { dg-options "-std=gnu17 -O2 -fcompare-debug -g" } */ +/* { dg-options "-std=gnu17 -O2 -fcompare-debug -g -march=i586 -mtune=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ typedef struct { int t1; int t2; int t3; } *T; typedef struct { int s; } S; diff --git a/gcc/testsuite/gcc.dg/pr43058.c b/gcc/testsuite/gcc.dg/pr43058.c index bba6f814a71b..c1ba39c1242f 100644 --- a/gcc/testsuite/gcc.dg/pr43058.c +++ b/gcc/testsuite/gcc.dg/pr43058.c @@ -1,6 +1,6 @@ /* PR debug/43058 */ /* { dg-do compile } */ -/* { dg-options "-g -O2" } */ +/* { dg-options "-std=gnu17 -g -O2" } */ /* { dg-timeout-factor 4 } */ extern void *f1 (void *, void *, void *); diff --git a/gcc/testsuite/gcc.dg/pr44539.c b/gcc/testsuite/gcc.dg/pr44539.c index 9cfff7a3ae53..cb9a631dead5 100644 --- a/gcc/testsuite/gcc.dg/pr44539.c +++ b/gcc/testsuite/gcc.dg/pr44539.c @@ -1,6 +1,6 @@ /* PR tree-optimization/44539 */ /* { dg-do compile } */ -/* { dg-options "-ftracer -freorder-blocks -O2" } */ +/* { dg-options "-std=gnu17 -ftracer -freorder-blocks -O2" } */ void bar (int file); extern int baz (void); diff --git a/gcc/testsuite/gcc.dg/pr45055.c b/gcc/testsuite/gcc.dg/pr45055.c index 899de50498bd..305f82391506 100644 --- a/gcc/testsuite/gcc.dg/pr45055.c +++ b/gcc/testsuite/gcc.dg/pr45055.c @@ -1,6 +1,6 @@ /* PR debug/45055 */ /* { dg-do compile } */ -/* { dg-options "-O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug" } */ +/* { dg-options "-std=gnu17 -O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug" } */ /* { dg-require-effective-target scheduling } */ int colormap[10]; diff --git a/gcc/testsuite/gcc.dg/pr50908.c b/gcc/testsuite/gcc.dg/pr50908.c index 114dded3ab15..3083a527c307 100644 --- a/gcc/testsuite/gcc.dg/pr50908.c +++ b/gcc/testsuite/gcc.dg/pr50908.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-O2 -ftree-tail-merge" } */ +/* { dg-options "-Wno-old-style-definition -O2 -ftree-tail-merge" } */ enum Lisp_Type { diff --git a/gcc/testsuite/gcc.dg/pr60647-1.c b/gcc/testsuite/gcc.dg/pr60647-1.c index 99f5919c34c8..e5d77f2e52e5 100644 --- a/gcc/testsuite/gcc.dg/pr60647-1.c +++ b/gcc/testsuite/gcc.dg/pr60647-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-Wno-old-style-definition -O2" } */ struct _wincore { diff --git a/gcc/testsuite/gcc.dg/pr63762.c b/gcc/testsuite/gcc.dg/pr63762.c index df110676eca6..8de8e63bfc0d 100644 --- a/gcc/testsuite/gcc.dg/pr63762.c +++ b/gcc/testsuite/gcc.dg/pr63762.c @@ -1,6 +1,6 @@ /* PR middle-end/63762 */ /* { dg-do assemble } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ #include diff --git a/gcc/testsuite/gcc.dg/pr63804.c b/gcc/testsuite/gcc.dg/pr63804.c index f0a02f26ae4b..f92822add968 100644 --- a/gcc/testsuite/gcc.dg/pr63804.c +++ b/gcc/testsuite/gcc.dg/pr63804.c @@ -1,6 +1,6 @@ /* PR rtl-optimization/63804 */ /* { dg-do compile } */ -/* { dg-options "-O2 -g" } */ +/* { dg-options "-std=gnu17 -O2 -g" } */ struct A { int gen; } e; int a, d; diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c index f5a8c102cf8a..cac464f492ee 100644 --- a/gcc/testsuite/gcc.dg/pr68306-3.c +++ b/gcc/testsuite/gcc.dg/pr68306-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3" } */ +/* { dg-options "-std=gnu17 -O3" } */ /* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/pr68533.c b/gcc/testsuite/gcc.dg/pr68533.c index 49e67a96168e..5e9a4c6c9913 100644 --- a/gcc/testsuite/gcc.dg/pr68533.c +++ b/gcc/testsuite/gcc.dg/pr68533.c @@ -1,6 +1,6 @@ /* PR c/68533 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ struct T { int t; }; diff --git a/gcc/testsuite/gcc.dg/pr69156.c b/gcc/testsuite/gcc.dg/pr69156.c index 5740971383c8..97b46aaa0e84 100644 --- a/gcc/testsuite/gcc.dg/pr69156.c +++ b/gcc/testsuite/gcc.dg/pr69156.c @@ -1,6 +1,6 @@ /* PR tree-optimization/69156 */ /* { dg-do compile } */ -/* { dg-options "-fpermissive -O1 -fno-tree-ccp" } */ +/* { dg-options "-std=gnu17 -fpermissive -O1 -fno-tree-ccp" } */ _Bool foo () diff --git a/gcc/testsuite/gcc.dg/pr7356-2.c b/gcc/testsuite/gcc.dg/pr7356-2.c index ad679756978d..9bed60d435dc 100644 --- a/gcc/testsuite/gcc.dg/pr7356-2.c +++ b/gcc/testsuite/gcc.dg/pr7356-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-fdiagnostics-show-caret" } */ +/* { dg-options "-Wno-old-style-definition -fdiagnostics-show-caret" } */ int i /* { dg-error "6: expected ';' before 'int'" } */ int j; diff --git a/gcc/testsuite/gcc.dg/pr79983.c b/gcc/testsuite/gcc.dg/pr79983.c index 1e292d421081..2cf83004b7c8 100644 --- a/gcc/testsuite/gcc.dg/pr79983.c +++ b/gcc/testsuite/gcc.dg/pr79983.c @@ -1,6 +1,6 @@ /* PR c/79983 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ struct S; struct S { int i; }; /* { dg-message "originally defined here" } */ diff --git a/gcc/testsuite/gcc.dg/pr83463.c b/gcc/testsuite/gcc.dg/pr83463.c index 9142d273e7cb..2af130cf3b08 100644 --- a/gcc/testsuite/gcc.dg/pr83463.c +++ b/gcc/testsuite/gcc.dg/pr83463.c @@ -1,7 +1,7 @@ /* PR middle-end/83463 */ /* { dg-do compile } */ /* { dg-prune-output "conflicting types for built-in" } */ -/* { dg-options "-O2 -Wrestrict -Wno-pointer-to-int-cast" } */ +/* { dg-options "-std=gnu17 -O2 -Wrestrict -Wno-pointer-to-int-cast" } */ int *a; void *memcpy (); diff --git a/gcc/testsuite/gcc.dg/pr87347.c b/gcc/testsuite/gcc.dg/pr87347.c index 2077964e9d38..009f95904fca 100644 --- a/gcc/testsuite/gcc.dg/pr87347.c +++ b/gcc/testsuite/gcc.dg/pr87347.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Wabsolute-value" } */ +/* { dg-options "-std=gnu17 -Wabsolute-value" } */ int a; int abs(); diff --git a/gcc/testsuite/gcc.dg/pr89521-1.c b/gcc/testsuite/gcc.dg/pr89521-1.c index ebf2c5932c3a..282c4f8b5ee4 100644 --- a/gcc/testsuite/gcc.dg/pr89521-1.c +++ b/gcc/testsuite/gcc.dg/pr89521-1.c @@ -1,6 +1,6 @@ /* PR c/89521 */ /* { dg-do compile } */ -/* { dg-options "-Ofast -w" } */ +/* { dg-options "-std=gnu17 -Ofast -w" } */ #define A(name) __typeof (__builtin_##name (0)) name (); long name##1 () { return name (1); } #define B(name) A(name) A(name##f) A(name##l) diff --git a/gcc/testsuite/gcc.dg/pr89521-2.c b/gcc/testsuite/gcc.dg/pr89521-2.c index 5e37c918fc27..b5ef8860e55a 100644 --- a/gcc/testsuite/gcc.dg/pr89521-2.c +++ b/gcc/testsuite/gcc.dg/pr89521-2.c @@ -1,6 +1,6 @@ /* PR c/89521 */ /* { dg-do compile } */ -/* { dg-options "-Ofast -w" } */ +/* { dg-options "-std=gnu17 -Ofast -w" } */ #define A(name) __typeof (__builtin_##name (0)) name (); \ float name##1 () { return name (1); } \ diff --git a/gcc/testsuite/gcc.dg/pr90648.c b/gcc/testsuite/gcc.dg/pr90648.c index bf1fa9894782..5a9922d5f87b 100644 --- a/gcc/testsuite/gcc.dg/pr90648.c +++ b/gcc/testsuite/gcc.dg/pr90648.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O" } */ +/* { dg-options "-std=gnu17 -O" } */ extern double copysign (); double foo (double x) diff --git a/gcc/testsuite/gcc.dg/pr93573-1.c b/gcc/testsuite/gcc.dg/pr93573-1.c index 26ec9b77d6f2..50a1c9747a99 100644 --- a/gcc/testsuite/gcc.dg/pr93573-1.c +++ b/gcc/testsuite/gcc.dg/pr93573-1.c @@ -1,6 +1,6 @@ /* PR c/93573 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void bar (); diff --git a/gcc/testsuite/gcc.dg/pr94167.c b/gcc/testsuite/gcc.dg/pr94167.c index 4b819d3a8694..efc87ab03faf 100644 --- a/gcc/testsuite/gcc.dg/pr94167.c +++ b/gcc/testsuite/gcc.dg/pr94167.c @@ -1,6 +1,6 @@ /* PR debug/94167 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fcompare-debug" } */ +/* { dg-options "-std=gnu17 -O2 -fcompare-debug" } */ struct S { int g, h; signed char i; int j; signed char k; int l[4]; } a, c; struct T { signed char g; } e; diff --git a/gcc/testsuite/gcc.dg/pr94705.c b/gcc/testsuite/gcc.dg/pr94705.c index 96392ab60ee1..6bd92f171e4c 100644 --- a/gcc/testsuite/gcc.dg/pr94705.c +++ b/gcc/testsuite/gcc.dg/pr94705.c @@ -1,6 +1,6 @@ /* PR c/94705 */ /* { dg-do compile } */ -/* { dg-options "" } */ +/* { dg-options "-std=gnu17" } */ void foo (); diff --git a/gcc/testsuite/gcc.dg/pr95118.c b/gcc/testsuite/gcc.dg/pr95118.c index 69bc47fd7aad..59173e6c577e 100644 --- a/gcc/testsuite/gcc.dg/pr95118.c +++ b/gcc/testsuite/gcc.dg/pr95118.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-fre" } */ +/* { dg-options "-std=gnu17 -O2 -fdump-tree-fre" } */ void a(); void b() { diff --git a/gcc/testsuite/gcc.dg/pr96335.c b/gcc/testsuite/gcc.dg/pr96335.c index ab243b3d1296..a6203f38a03a 100644 --- a/gcc/testsuite/gcc.dg/pr96335.c +++ b/gcc/testsuite/gcc.dg/pr96335.c @@ -1,6 +1,6 @@ /* PR middle-end/96335 */ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ void bar (int, void *) __attribute__((__access__(__read_only__, 2))); diff --git a/gcc/testsuite/gcc.dg/pr97830.c b/gcc/testsuite/gcc.dg/pr97830.c index 3729a65aec2c..fd79620e7702 100644 --- a/gcc/testsuite/gcc.dg/pr97830.c +++ b/gcc/testsuite/gcc.dg/pr97830.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ typedef enum { LangC } cLanguage; typedef enum { FunctionOneArg, FunctionStandard } cFunctionType; diff --git a/gcc/testsuite/gcc.dg/pr97882.c b/gcc/testsuite/gcc.dg/pr97882.c index 48ea93d53c79..6666f898562a 100644 --- a/gcc/testsuite/gcc.dg/pr97882.c +++ b/gcc/testsuite/gcc.dg/pr97882.c @@ -1,6 +1,6 @@ /* PR c/97882 - Segmentation Fault on improper redeclaration of function { dg-do compile } - { dg-options "" } */ + { dg-options "-std=gnu17" } */ // Check pointer declaration incompatibiliies. diff --git a/gcc/testsuite/gcc.dg/pr99122-2.c b/gcc/testsuite/gcc.dg/pr99122-2.c index c0c850f141cd..3947f7dcdc80 100644 --- a/gcc/testsuite/gcc.dg/pr99122-2.c +++ b/gcc/testsuite/gcc.dg/pr99122-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -g -w" } */ +/* { dg-options "-std=gnu17 -O2 -g -w" } */ /* { dg-require-effective-target alloca } */ static int foo (); diff --git a/gcc/testsuite/gcc.dg/pr99122-3.c b/gcc/testsuite/gcc.dg/pr99122-3.c index 6a908ad86c04..3e72a3032774 100644 --- a/gcc/testsuite/gcc.dg/pr99122-3.c +++ b/gcc/testsuite/gcc.dg/pr99122-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -g -w" } */ +/* { dg-options "-std=gnu17 -O2 -g -w" } */ static int foo (); diff --git a/gcc/testsuite/gcc.dg/qual-component-1.c b/gcc/testsuite/gcc.dg/qual-component-1.c index 4eaa71a2d19a..f2043ce51443 100644 --- a/gcc/testsuite/gcc.dg/qual-component-1.c +++ b/gcc/testsuite/gcc.dg/qual-component-1.c @@ -3,7 +3,7 @@ union. Bug 27697 from Frank Victor Fischer. */ /* Origin: Joseph Myers */ /* { dg-do compile } */ -/* { dg-options "-pedantic -Wdiscarded-array-qualifiers" } */ +/* { dg-options "-std=gnu17 -pedantic -Wdiscarded-array-qualifiers" } */ struct s { int a; diff --git a/gcc/testsuite/gcc.dg/sibcall-6.c b/gcc/testsuite/gcc.dg/sibcall-6.c index 8ee72cac4440..c8830b665e9f 100644 --- a/gcc/testsuite/gcc.dg/sibcall-6.c +++ b/gcc/testsuite/gcc.dg/sibcall-6.c @@ -8,7 +8,7 @@ /* { dg-do run { target epiphany-*-* i?86-*-* x86_64-*-* s390*-*-* } } */ /* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ia32 && { ! nonpic } } } } */ -/* { dg-options "-O2 -foptimize-sibling-calls -fno-ipa-cp" } */ +/* { dg-options "-Wno-old-style-definition -O2 -foptimize-sibling-calls -fno-ipa-cp" } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.dg/sms-2.c b/gcc/testsuite/gcc.dg/sms-2.c index f8375f9f05d3..61723141d96b 100644 --- a/gcc/testsuite/gcc.dg/sms-2.c +++ b/gcc/testsuite/gcc.dg/sms-2.c @@ -2,7 +2,7 @@ traversal of the loops after versioning. */ /* { dg-do compile } */ -/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fmodulo-sched -fdump-rtl-sms" } */ int th, h, em, nlwm, nlwS, nlw, sy; void diff --git a/gcc/testsuite/gcc.dg/tm/20091221.c b/gcc/testsuite/gcc.dg/tm/20091221.c index 7837243fe5c1..655e55cfb24f 100644 --- a/gcc/testsuite/gcc.dg/tm/20091221.c +++ b/gcc/testsuite/gcc.dg/tm/20091221.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fgnu-tm -fdump-tree-tmedge" } */ +/* { dg-options "-std=gnu17 -fgnu-tm -fdump-tree-tmedge" } */ int i; extern void virgin () __attribute__((transaction_pure)); diff --git a/gcc/testsuite/gcc.dg/torture/bfloat16-basic.c b/gcc/testsuite/gcc.dg/torture/bfloat16-basic.c index 09e54d4470a7..20ce60eb7afe 100644 --- a/gcc/testsuite/gcc.dg/torture/bfloat16-basic.c +++ b/gcc/testsuite/gcc.dg/torture/bfloat16-basic.c @@ -1,6 +1,6 @@ /* Test __bf16. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options bfloat16 } */ /* { dg-require-effective-target bfloat16_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float128-basic.c b/gcc/testsuite/gcc.dg/torture/float128-basic.c index b23d45bf72ba..24a22b0eb157 100644 --- a/gcc/testsuite/gcc.dg/torture/float128-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float128-basic.c @@ -1,6 +1,6 @@ /* Test _Float128. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float128 } */ /* { dg-require-effective-target float128_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float128x-basic.c b/gcc/testsuite/gcc.dg/torture/float128x-basic.c index 75c5a28bb9d0..ea80990a6176 100644 --- a/gcc/testsuite/gcc.dg/torture/float128x-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float128x-basic.c @@ -1,6 +1,6 @@ /* Test _Float128x. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float128x } */ /* { dg-require-effective-target float128x_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float16-basic.c b/gcc/testsuite/gcc.dg/torture/float16-basic.c index e94aa203d40a..adcbdf936b58 100644 --- a/gcc/testsuite/gcc.dg/torture/float16-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float16-basic.c @@ -1,6 +1,6 @@ /* Test _Float16. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float16 } */ /* { dg-require-effective-target float16_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float32-basic.c b/gcc/testsuite/gcc.dg/torture/float32-basic.c index 2d3e7a961751..e6b2785bdef3 100644 --- a/gcc/testsuite/gcc.dg/torture/float32-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float32-basic.c @@ -1,6 +1,6 @@ /* Test _Float32. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float32 } */ /* { dg-require-effective-target float32_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float32x-basic.c b/gcc/testsuite/gcc.dg/torture/float32x-basic.c index f2abc332488e..b4ca33f63758 100644 --- a/gcc/testsuite/gcc.dg/torture/float32x-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float32x-basic.c @@ -1,6 +1,6 @@ /* Test _Float32x. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float32x } */ /* { dg-require-effective-target float32x_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float64-basic.c b/gcc/testsuite/gcc.dg/torture/float64-basic.c index decb05f34b26..7e644c317184 100644 --- a/gcc/testsuite/gcc.dg/torture/float64-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float64-basic.c @@ -1,6 +1,6 @@ /* Test _Float64. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float64 } */ /* { dg-require-effective-target float64_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/float64x-basic.c b/gcc/testsuite/gcc.dg/torture/float64x-basic.c index 7a140af0bd78..90dac84bf0bf 100644 --- a/gcc/testsuite/gcc.dg/torture/float64x-basic.c +++ b/gcc/testsuite/gcc.dg/torture/float64x-basic.c @@ -1,6 +1,6 @@ /* Test _Float64x. */ /* { dg-do run } */ -/* { dg-options "" } */ +/* { dg-options "-Wno-old-style-definition" } */ /* { dg-add-options float64x } */ /* { dg-require-effective-target float64x_runtime } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr102762.c b/gcc/testsuite/gcc.dg/torture/pr102762.c index 67c6b00ccea9..d52a970ae396 100644 --- a/gcc/testsuite/gcc.dg/torture/pr102762.c +++ b/gcc/testsuite/gcc.dg/torture/pr102762.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* We fail to diagnose the invalid __builtin_va_arg_pack use with -flto. */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr103987.c b/gcc/testsuite/gcc.dg/torture/pr103987.c index 6bfc76881a19..6fc2eff72ea4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr103987.c +++ b/gcc/testsuite/gcc.dg/torture/pr103987.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ void foo(); diff --git a/gcc/testsuite/gcc.dg/torture/pr104825.c b/gcc/testsuite/gcc.dg/torture/pr104825.c index 7affacc20942..417012e5fdd4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr104825.c +++ b/gcc/testsuite/gcc.dg/torture/pr104825.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-Wno-stringop-overread" } */ +/* { dg-additional-options "-Wno-old-style-definition -Wno-stringop-overread" } */ int foo (fmt) char* fmt; diff --git a/gcc/testsuite/gcc.dg/torture/pr105166.c b/gcc/testsuite/gcc.dg/torture/pr105166.c index 60e8b73a466c..745af50e6627 100644 --- a/gcc/testsuite/gcc.dg/torture/pr105166.c +++ b/gcc/testsuite/gcc.dg/torture/pr105166.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ int bar (foo, a) int (**foo) (); diff --git a/gcc/testsuite/gcc.dg/torture/pr105185.c b/gcc/testsuite/gcc.dg/torture/pr105185.c index 6ab32360de11..88dee57c5c4c 100644 --- a/gcc/testsuite/gcc.dg/torture/pr105185.c +++ b/gcc/testsuite/gcc.dg/torture/pr105185.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ int foo (fmt) char* fmt; diff --git a/gcc/testsuite/gcc.dg/torture/pr109652.c b/gcc/testsuite/gcc.dg/torture/pr109652.c index 8a6524d2212e..b3d5de9c61e4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr109652.c +++ b/gcc/testsuite/gcc.dg/torture/pr109652.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ typedef int UInt; UInt skeletal_RI5_instr; diff --git a/gcc/testsuite/gcc.dg/torture/pr112444.c b/gcc/testsuite/gcc.dg/torture/pr112444.c index 61c7ec9b22e8..769df6ae6ac3 100644 --- a/gcc/testsuite/gcc.dg/torture/pr112444.c +++ b/gcc/testsuite/gcc.dg/torture/pr112444.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */ +/* { dg-additional-options "-std=gnu17 -ftrivial-auto-var-init=zero" } */ int qmi_message_pbm_get_all_capabilities_output_capability_basic_information_get_printable_message_offset, qmi_message_pbm_get_all_capabilities_output_capability_basic_information_get_printable_message_init_offset, diff --git a/gcc/testsuite/gcc.dg/torture/pr113895-3.c b/gcc/testsuite/gcc.dg/torture/pr113895-3.c index 255975f3353f..d8760e7de543 100644 --- a/gcc/testsuite/gcc.dg/torture/pr113895-3.c +++ b/gcc/testsuite/gcc.dg/torture/pr113895-3.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ extern void f(); char a[1][1], b; diff --git a/gcc/testsuite/gcc.dg/torture/pr24626-2.c b/gcc/testsuite/gcc.dg/torture/pr24626-2.c index 541c8c5aca47..c6d15ea8a3f5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr24626-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr24626-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); diff --git a/gcc/testsuite/gcc.dg/torture/pr25183.c b/gcc/testsuite/gcc.dg/torture/pr25183.c index 84b4c8f8d44b..22af72b8dd0d 100644 --- a/gcc/testsuite/gcc.dg/torture/pr25183.c +++ b/gcc/testsuite/gcc.dg/torture/pr25183.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-pedantic" } */ +/* { dg-options "-std=gnu17 -pedantic" } */ enum err { err_IO = 0x8a450000, /* { dg-warning "int" } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr38948.c b/gcc/testsuite/gcc.dg/torture/pr38948.c index 22cef3b356d9..01b7213e90fc 100644 --- a/gcc/testsuite/gcc.dg/torture/pr38948.c +++ b/gcc/testsuite/gcc.dg/torture/pr38948.c @@ -1,4 +1,4 @@ -/* { dg-options "-fno-tree-sra" } */ +/* { dg-options "-std=gnu17 -fno-tree-sra" } */ typedef unsigned char byte; typedef unsigned int uint; typedef int bool; diff --git a/gcc/testsuite/gcc.dg/torture/pr44807.c b/gcc/testsuite/gcc.dg/torture/pr44807.c index 918333e25631..2230db654108 100644 --- a/gcc/testsuite/gcc.dg/torture/pr44807.c +++ b/gcc/testsuite/gcc.dg/torture/pr44807.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ int sigemptyset (int *); int sigaddset(int, int); diff --git a/gcc/testsuite/gcc.dg/torture/pr47281.c b/gcc/testsuite/gcc.dg/torture/pr47281.c index 517e8548e3f7..752b472c93e5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr47281.c +++ b/gcc/testsuite/gcc.dg/torture/pr47281.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ struct T; typedef void F(void); diff --git a/gcc/testsuite/gcc.dg/torture/pr47958-1.c b/gcc/testsuite/gcc.dg/torture/pr47958-1.c index 9fdf142fc991..14feffb9ff92 100644 --- a/gcc/testsuite/gcc.dg/torture/pr47958-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr47958-1.c @@ -1,4 +1,5 @@ /* { dg-do assemble } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ void (*foo[6][6]) (int); void bar (hdR) diff --git a/gcc/testsuite/gcc.dg/torture/pr48063.c b/gcc/testsuite/gcc.dg/torture/pr48063.c index d861bf04c801..ff6960f089cc 100644 --- a/gcc/testsuite/gcc.dg/torture/pr48063.c +++ b/gcc/testsuite/gcc.dg/torture/pr48063.c @@ -1,6 +1,6 @@ /* PR tree-optimization/48063 */ /* { dg-do compile } */ -/* { dg-options "-fno-early-inlining" } */ +/* { dg-options "-std=gnu17 -fno-early-inlining" } */ extern void abort (void); static void bar (); diff --git a/gcc/testsuite/gcc.dg/torture/pr57036-1.c b/gcc/testsuite/gcc.dg/torture/pr57036-1.c index ac6bc6b9df29..b1cddb103499 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57036-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr57036-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ extern void g (void); int _setjmp(); diff --git a/gcc/testsuite/gcc.dg/torture/pr57330.c b/gcc/testsuite/gcc.dg/torture/pr57330.c index 3e6cbcbd28ca..362622c6a64a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57330.c +++ b/gcc/testsuite/gcc.dg/torture/pr57330.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ void foo (int a) {} diff --git a/gcc/testsuite/gcc.dg/torture/pr57584.c b/gcc/testsuite/gcc.dg/torture/pr57584.c index e4affb2e4614..475dabe9a43e 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57584.c +++ b/gcc/testsuite/gcc.dg/torture/pr57584.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target int32plus } */ /* { dg-require-effective-target label_values } */ /* { dg-require-effective-target indirect_jumps } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr67741.c b/gcc/testsuite/gcc.dg/torture/pr67741.c index c0019d04a86b..d1a8c251fd7a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr67741.c +++ b/gcc/testsuite/gcc.dg/torture/pr67741.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ struct singlecomplex { float real, imag ; } ; struct doublecomplex { double real, imag ; } ; diff --git a/gcc/testsuite/gcc.dg/torture/pr68104.c b/gcc/testsuite/gcc.dg/torture/pr68104.c index 5db0282cdc76..8743ecf52bd9 100644 --- a/gcc/testsuite/gcc.dg/torture/pr68104.c +++ b/gcc/testsuite/gcc.dg/torture/pr68104.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ typedef struct { diff --git a/gcc/testsuite/gcc.dg/torture/pr69242.c b/gcc/testsuite/gcc.dg/torture/pr69242.c index d7f171810b96..2a50a167d1a6 100644 --- a/gcc/testsuite/gcc.dg/torture/pr69242.c +++ b/gcc/testsuite/gcc.dg/torture/pr69242.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-w" } */ +/* { dg-additional-options "-std=gnu17 -w" } */ int a[1]; void *memcpy(); diff --git a/gcc/testsuite/gcc.dg/torture/pr70457.c b/gcc/testsuite/gcc.dg/torture/pr70457.c index 74daed4d36f6..e0a212f1dbc2 100644 --- a/gcc/testsuite/gcc.dg/torture/pr70457.c +++ b/gcc/testsuite/gcc.dg/torture/pr70457.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* This formerly ICEd when trying to expand pow as a built-in with the wrong number of arguments. */ diff --git a/gcc/testsuite/gcc.dg/torture/pr70985.c b/gcc/testsuite/gcc.dg/torture/pr70985.c index 17273b029a40..36544934850b 100644 --- a/gcc/testsuite/gcc.dg/torture/pr70985.c +++ b/gcc/testsuite/gcc.dg/torture/pr70985.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target int32plus } */ struct diff --git a/gcc/testsuite/gcc.dg/torture/pr71606.c b/gcc/testsuite/gcc.dg/torture/pr71606.c index b0cc26ac7715..ec7a1102b305 100644 --- a/gcc/testsuite/gcc.dg/torture/pr71606.c +++ b/gcc/testsuite/gcc.dg/torture/pr71606.c @@ -1,3 +1,5 @@ +/* { dg-additional-options "-std=gnu17" } */ + _Complex a; void fn1 (); diff --git a/gcc/testsuite/gcc.dg/torture/pr71816.c b/gcc/testsuite/gcc.dg/torture/pr71816.c index cc143fa6c7de..5db86b9c1048 100644 --- a/gcc/testsuite/gcc.dg/torture/pr71816.c +++ b/gcc/testsuite/gcc.dg/torture/pr71816.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-prune-output "\\\[-Wbuiltin-declaration-mismatch" } */ void *ext2fs_resize_mem_p; diff --git a/gcc/testsuite/gcc.dg/torture/pr77286.c b/gcc/testsuite/gcc.dg/torture/pr77286.c index 0c0610050f14..29d96eb76006 100644 --- a/gcc/testsuite/gcc.dg/torture/pr77286.c +++ b/gcc/testsuite/gcc.dg/torture/pr77286.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */ typedef float real; diff --git a/gcc/testsuite/gcc.dg/torture/pr77646.c b/gcc/testsuite/gcc.dg/torture/pr77646.c index 1b1990037bf1..6366c1be7eb5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr77646.c +++ b/gcc/testsuite/gcc.dg/torture/pr77646.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ struct e { int (*f)(); diff --git a/gcc/testsuite/gcc.dg/torture/pr77677-2.c b/gcc/testsuite/gcc.dg/torture/pr77677-2.c index 768ab12601cc..4ba25f0c6fa5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr77677-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr77677-2.c @@ -1,6 +1,6 @@ /* PR ipa/77677 */ /* { dg-do compile } */ -/* { dg-options "-fpermissive -w" } */ +/* { dg-options "-std=gnu17 -fpermissive -w" } */ enum machine_mode { MAX_MACHINE_MODE }; diff --git a/gcc/testsuite/gcc.dg/torture/pr78365.c b/gcc/testsuite/gcc.dg/torture/pr78365.c index 5180a0171ae6..2588a4826fd3 100644 --- a/gcc/testsuite/gcc.dg/torture/pr78365.c +++ b/gcc/testsuite/gcc.dg/torture/pr78365.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ int a, b, c; char d; diff --git a/gcc/testsuite/gcc.dg/torture/pr79732.c b/gcc/testsuite/gcc.dg/torture/pr79732.c index ed2695bf2677..cfa337cf7a51 100644 --- a/gcc/testsuite/gcc.dg/torture/pr79732.c +++ b/gcc/testsuite/gcc.dg/torture/pr79732.c @@ -1,4 +1,5 @@ /* { dg-do link } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-alias "" } */ int bar () __attribute__ ((alias ("foo"))); diff --git a/gcc/testsuite/gcc.dg/torture/pr80612.c b/gcc/testsuite/gcc.dg/torture/pr80612.c index e648e82559c2..d3f82d306b70 100644 --- a/gcc/testsuite/gcc.dg/torture/pr80612.c +++ b/gcc/testsuite/gcc.dg/torture/pr80612.c @@ -1,5 +1,6 @@ /* PR tree-optimization/80612 */ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ struct obstack *a; struct obstack { diff --git a/gcc/testsuite/gcc.dg/torture/pr80764.c b/gcc/testsuite/gcc.dg/torture/pr80764.c index bc6d8e87ac3e..c8e5655990cb 100644 --- a/gcc/testsuite/gcc.dg/torture/pr80764.c +++ b/gcc/testsuite/gcc.dg/torture/pr80764.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ int b, d, f, h; char e; diff --git a/gcc/testsuite/gcc.dg/torture/pr80842.c b/gcc/testsuite/gcc.dg/torture/pr80842.c index 600e8ce13aed..2fc4059a1091 100644 --- a/gcc/testsuite/gcc.dg/torture/pr80842.c +++ b/gcc/testsuite/gcc.dg/torture/pr80842.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ unsigned a; short b; diff --git a/gcc/testsuite/gcc.dg/torture/pr81900.c b/gcc/testsuite/gcc.dg/torture/pr81900.c index 9e4e8f4a7cad..2936f1de4a8c 100644 --- a/gcc/testsuite/gcc.dg/torture/pr81900.c +++ b/gcc/testsuite/gcc.dg/torture/pr81900.c @@ -1,7 +1,7 @@ /* PR/81900 */ /* { dg-do compile } */ /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ -/* { dg-options "-fdump-tree-optimized" } */ +/* { dg-options "-std=gnu17 -fdump-tree-optimized" } */ void Perl_croak() __attribute__((noreturn)); char *Perl_sv_gets(); diff --git a/gcc/testsuite/gcc.dg/torture/pr82276.c b/gcc/testsuite/gcc.dg/torture/pr82276.c index 2f9efc8b9141..fc9f2c5a0786 100644 --- a/gcc/testsuite/gcc.dg/torture/pr82276.c +++ b/gcc/testsuite/gcc.dg/torture/pr82276.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ typedef struct a { struct a *b; diff --git a/gcc/testsuite/gcc.dg/torture/pr84803.c b/gcc/testsuite/gcc.dg/torture/pr84803.c index 81aad626d6c4..e9f3783212ad 100644 --- a/gcc/testsuite/gcc.dg/torture/pr84803.c +++ b/gcc/testsuite/gcc.dg/torture/pr84803.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ long a; long *b; diff --git a/gcc/testsuite/gcc.dg/torture/pr93124.c b/gcc/testsuite/gcc.dg/torture/pr93124.c index 0d361d8c7cfa..e654ab833097 100644 --- a/gcc/testsuite/gcc.dg/torture/pr93124.c +++ b/gcc/testsuite/gcc.dg/torture/pr93124.c @@ -1,4 +1,4 @@ -/* { dg-additional-options "-fno-rerun-cse-after-loop -fno-guess-branch-probability -fno-tree-fre" } */ +/* { dg-additional-options "-std=gnu17 -fno-rerun-cse-after-loop -fno-guess-branch-probability -fno-tree-fre" } */ /* { dg-require-effective-target alloca } */ int x; diff --git a/gcc/testsuite/gcc.dg/torture/pr97330-1.c b/gcc/testsuite/gcc.dg/torture/pr97330-1.c index 7dce5bd90d40..8bd20371388b 100644 --- a/gcc/testsuite/gcc.dg/torture/pr97330-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr97330-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-Wno-old-style-definition" } */ typedef int a; typedef char b; diff --git a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c index baed1e3fa78a..322ebf7f7ba1 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target freorder } */ /* { dg-require-effective-target label_values } */ -/* { dg-options "-O2 -freorder-blocks-and-partition" } */ +/* { dg-options "-std=gnu17 -O2 -freorder-blocks-and-partition" } */ /* { dg-require-stack-size "4000" } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c index ce50af26a7c5..9fa3a88408a5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c index 8b7ab985bd33..9910c7902d74 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030708-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ extern void abort (void); struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c index 78938f919d46..e228400c97be 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fdump-tree-dce3" } */ +/* { dg-options "-Wno-old-style-definition -O -fdump-tree-dce3" } */ struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c index 838317de293a..2c9920ae039a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c index 529c79b26e3f..11391e6ee6af 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-copyprop2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-copyprop2" } */ extern void abort (void); extern void blah (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c index 080ccfa83828..c3f75eff29ef 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ extern void abort (void); extern void blah (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c index 7fce5ab4b66b..6f3c8c303b7b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-dom2" } */ struct rtx_def; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c index 15d7e9730418..f5b0a14837e9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ struct rtx_def; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c index 9f0daac22dc0..ad1b8ad791b3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030714-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ struct rtx_def; typedef struct rtx_def *rtx; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c index 9585ff11307b..a3b564da368f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030714-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c index 7c1fea7dfbb3..10ed817d5705 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-rtl-expand-details" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-rtl-expand-details" } */ union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c index 0e01e511b786..939dbaec2ea4 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-10.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-vrp1" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-vrp1" } */ extern const unsigned char mode_size[]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c index 6effbb7ffe54..e7e73cb45027 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-11.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ extern void abort (void); struct rtx_def; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-3.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-3.c index bba3569c76f3..1097798158a3 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-3.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */ typedef unsigned int cppchar_t; void foo (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-6.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-6.c index e680de8bdee5..1453df6eeb0c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-vrp1" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-vrp1" } */ void diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c index ca06f712890f..857191de16e1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-vrp1" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-vrp1" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c index e59b3e346c28..53a2d01763af 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2 -fdump-tree-optimized" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2 -fdump-tree-optimized" } */ extern void abort (void); union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c index 1b0bef1d3e08..986540ca1bc2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-dom2 -fdump-tree-optimized" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2 -fdump-tree-optimized" } */ extern void abort (void); union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c b/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c index e4b8d43d2994..d147dff6f08a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030814-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fno-tree-fre -fdump-tree-dom2" } */ +/* { dg-options "-Wno-old-style-definition -O1 -fno-tree-fre -fdump-tree-dom2" } */ extern void abort (void); union tree_node; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030918-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030918-1.c index 719ea65f5bf8..271f0a5760f9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20030918-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20030918-1.c @@ -2,7 +2,7 @@ references after propagating &equot[0] into p. */ /* { dg-do compile } */ -/* { dg-options "-O -ftree-dominator-opts" } */ +/* { dg-options "-Wno-old-style-definition -O -ftree-dominator-opts" } */ static unsigned short equot[(6 +3)]; int diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040514-2.c b/gcc/testsuite/gcc.dg/tree-ssa/20040514-2.c index 11f766716040..5ec48e3da95d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040514-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040514-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-phiopt1" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-phiopt1" } */ int foo2 (distance, i, j) int distance; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c b/gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c index 52903dde497b..746100836f33 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loadpre7.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-pre-stats" } */ +/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-pre-stats" } */ /* We can't eliminate the *p load here in any sane way, as eshup8 may change it. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c b/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c index a520765dd9fe..59d3a9666623 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr111003.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -fdump-tree-optimized" } */ +/* { dg-options "-std=gnu17 -O3 -fdump-tree-optimized" } */ static int c, d, e, f; static short g; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr115128.c b/gcc/testsuite/gcc.dg/tree-ssa/pr115128.c index 14bd4dbd6e51..278843019b28 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr115128.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr115128.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -w" } */ +/* { dg-options "-std=gnu17 -O3 -w" } */ long XXH3_len_4to8_64b_len, XXH3_len_0to16_64b___trans_tmp_3, XXH3_mix2Accs_acc, XXH3_64bits_internal___trans_tmp_8; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr115191.c b/gcc/testsuite/gcc.dg/tree-ssa/pr115191.c index 43f780aa3b84..fe0c1321883f 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr115191.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr115191.c @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-O1 -w" } +// { dg-options "-std=gnu17 -O1 -w" } typedef void *SCM; void set_socket_io_ports(); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr24840.c b/gcc/testsuite/gcc.dg/tree-ssa/pr24840.c index 0ce9ed3a6208..b749151d5039 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr24840.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr24840.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ typedef struct { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr69666.c b/gcc/testsuite/gcc.dg/tree-ssa/pr69666.c index 9be77ea1523b..220c0cde15b2 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr69666.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr69666.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -w" } */ +/* { dg-options "-std=gnu17 -O2 -w" } */ int a, c, d; float b; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr70232.c b/gcc/testsuite/gcc.dg/tree-ssa/pr70232.c index d636672fddcb..6873f87bccee 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr70232.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr70232.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -w -fdump-tree-vrp1-details -fdump-tree-vrp2-details -fdump-tree-dom2-details -fdump-tree-dom3-details" } */ +/* { dg-options "-std=gnu17 -O2 -w -fdump-tree-vrp1-details -fdump-tree-vrp2-details -fdump-tree-dom2-details -fdump-tree-dom3-details" } */ /* All the threads found by the threader should have too many statements to be profitable. */ diff --git a/gcc/testsuite/gcc.dg/ubsan/pr79757-1.c b/gcc/testsuite/gcc.dg/ubsan/pr79757-1.c index ca074bcff465..20ed2cdb93f7 100644 --- a/gcc/testsuite/gcc.dg/ubsan/pr79757-1.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr79757-1.c @@ -1,7 +1,7 @@ /* PR sanitizer/79757 */ /* { dg-do compile } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-fsanitize=undefined" } */ +/* { dg-options "-Wno-old-style-definition -fsanitize=undefined" } */ unsigned __int128 x, y; diff --git a/gcc/testsuite/gcc.dg/ubsan/pr79757-2.c b/gcc/testsuite/gcc.dg/ubsan/pr79757-2.c index b3e1939a547f..32e38c11ef0a 100644 --- a/gcc/testsuite/gcc.dg/ubsan/pr79757-2.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr79757-2.c @@ -1,7 +1,7 @@ /* PR sanitizer/79757 */ /* { dg-do compile } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-fsanitize=undefined" } */ +/* { dg-options "-Wno-old-style-definition -fsanitize=undefined" } */ unsigned __int128 x, y; diff --git a/gcc/testsuite/gcc.dg/ubsan/pr79757-3.c b/gcc/testsuite/gcc.dg/ubsan/pr79757-3.c index 22fe3deef2da..7eb3fee54ce6 100644 --- a/gcc/testsuite/gcc.dg/ubsan/pr79757-3.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr79757-3.c @@ -1,7 +1,7 @@ /* PR sanitizer/79757 */ /* { dg-do compile } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-fsanitize=undefined" } */ +/* { dg-options "-Wno-old-style-definition -fsanitize=undefined" } */ unsigned __int128 x, y; diff --git a/gcc/testsuite/gcc.dg/ubsan/pr81223.c b/gcc/testsuite/gcc.dg/ubsan/pr81223.c index e7aff5243e60..f72b1cda809d 100644 --- a/gcc/testsuite/gcc.dg/ubsan/pr81223.c +++ b/gcc/testsuite/gcc.dg/ubsan/pr81223.c @@ -1,6 +1,6 @@ /* PR sanitizer/81223 */ /* { dg-do compile } */ -/* { dg-options "-fsanitize=undefined" } */ +/* { dg-options "-std=gnu17 -fsanitize=undefined" } */ void bar (); diff --git a/gcc/testsuite/gcc.dg/uninit-10-O0.c b/gcc/testsuite/gcc.dg/uninit-10-O0.c index f761ac91c415..18fe56cd26cb 100644 --- a/gcc/testsuite/gcc.dg/uninit-10-O0.c +++ b/gcc/testsuite/gcc.dg/uninit-10-O0.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-Wall" } */ +/* { dg-options "-Wno-old-style-definition -Wall" } */ /* On Alpha EV4, dead code elimination and cfg simplification conspired to leave the register containing 'C' marked live, though all references to the variable had been removed. */ diff --git a/gcc/testsuite/gcc.dg/uninit-10.c b/gcc/testsuite/gcc.dg/uninit-10.c index 0d62020df9f5..e2396a5e18a6 100644 --- a/gcc/testsuite/gcc.dg/uninit-10.c +++ b/gcc/testsuite/gcc.dg/uninit-10.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Wall" } */ +/* { dg-options "-Wno-old-style-definition -O2 -Wall" } */ /* On Alpha EV4, dead code elimination and cfg simplification conspired to leave the register containing 'C' marked live, though all references to the variable had been removed. */ diff --git a/gcc/testsuite/gcc.dg/uninit-32.c b/gcc/testsuite/gcc.dg/uninit-32.c index cf9efa0f0644..586b6355f436 100644 --- a/gcc/testsuite/gcc.dg/uninit-32.c +++ b/gcc/testsuite/gcc.dg/uninit-32.c @@ -1,7 +1,7 @@ /* PR middle-end/10138 - warn for uninitialized arrays passed as const* arguments { dg-do compile } - { dg-options "-O -Wall" } + { dg-options "-std=gnu17 -O -Wall" } { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/uninit-41.c b/gcc/testsuite/gcc.dg/uninit-41.c index f2e17a81d092..2f138cb8e5cb 100644 --- a/gcc/testsuite/gcc.dg/uninit-41.c +++ b/gcc/testsuite/gcc.dg/uninit-41.c @@ -1,7 +1,7 @@ /* Verify that calls to non-modifying built-ins aren't considered potentially modifying. { dg-do compile } - { dg-options "-O2 -Wall" } + { dg-options "-std=gnu17 -O2 -Wall" } { dg-require-effective-target alloca } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/uninit-A-O0.c b/gcc/testsuite/gcc.dg/uninit-A-O0.c index 693769115635..c1f1a1cd6c72 100644 --- a/gcc/testsuite/gcc.dg/uninit-A-O0.c +++ b/gcc/testsuite/gcc.dg/uninit-A-O0.c @@ -2,7 +2,7 @@ May be a real bug in CSE. */ /* { dg-do compile } */ -/* { dg-options "-Wall" } */ +/* { dg-options "-Wno-old-style-definition -Wall" } */ struct tree { diff --git a/gcc/testsuite/gcc.dg/uninit-A.c b/gcc/testsuite/gcc.dg/uninit-A.c index 28f7fe9fcf46..2adc374fbed2 100644 --- a/gcc/testsuite/gcc.dg/uninit-A.c +++ b/gcc/testsuite/gcc.dg/uninit-A.c @@ -2,7 +2,7 @@ May be a real bug in CSE. */ /* { dg-do compile } */ -/* { dg-options "-O2 -Wall" } */ +/* { dg-options "-O2 -Wall -Wno-old-style-definition" } */ struct tree { diff --git a/gcc/testsuite/gcc.dg/unused-1.c b/gcc/testsuite/gcc.dg/unused-1.c index 8db7c2ccfff5..2cc86c04faa1 100644 --- a/gcc/testsuite/gcc.dg/unused-1.c +++ b/gcc/testsuite/gcc.dg/unused-1.c @@ -2,7 +2,7 @@ egcs-1.1.2 fails, egcs-ss-19990418 passes. http://gcc.gnu.org/ml/gcc-bugs/1998-09/msg00199.html */ /* { dg-do compile } */ -/* { dg-options "-O -Wall -W" } */ +/* { dg-options "-Wno-old-style-definition -O -Wall -W" } */ int f(c) char c; /* { dg-warning "unused parameter" "unused parameter warning" } */ diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr114249.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr114249.c index 64c93cd9a2de..36ccb2c0e944 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr114249.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr114249.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ enum { SEG_THIN_POOL } read_only; struct { diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97486.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97486.c index 17d48a7fe69a..fceb93367b6c 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97486.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97486.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ struct { int *end_info; diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c index bea3b92ba775..dd3f91be4d24 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-1.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target vect_int } */ /* PR tree-optimization/67682. */ diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c index 9431bcb9d5c4..2ee50039af38 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-2.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target vect_perm } */ /* PR tree-optimization/67682. */ diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c index d1d79125731e..1b3d5d99eca4 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-subgroups-3.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target vect_int_mult } */ /* PR tree-optimization/67682. */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c index b205f470660a..05edf59bec80 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-add-options vect_early_break } */ /* { dg-require-effective-target vect_early_break } */ /* { dg-require-effective-target vect_long } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_122-pr114239.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_122-pr114239.c index 7bf4db142096..eea47f73e948 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_122-pr114239.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_122-pr114239.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-add-options vect_early_break } */ /* { dg-require-effective-target vect_early_break } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c index 033c3587f1b2..d914b88d7315 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c +++ b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c @@ -6,6 +6,7 @@ increment by 2 integers at a time, hence the last load needs s[30-33] and the penultimate load needs s[28-31]. This testcase ensures that we do not crash due to that behaviour. */ +/* { dg-additional-options "-std=gnu17" } */ /* { dg-require-effective-target mmap } */ #include #include diff --git a/gcc/testsuite/gcc.dg/vla-stexp-2.c b/gcc/testsuite/gcc.dg/vla-stexp-2.c index 9f1512567f0f..8616ef75d096 100644 --- a/gcc/testsuite/gcc.dg/vla-stexp-2.c +++ b/gcc/testsuite/gcc.dg/vla-stexp-2.c @@ -1,6 +1,6 @@ /* PR101838 */ /* { dg-do run } */ -/* { dg-options "-Wpedantic -O0" } */ +/* { dg-options "-std=gnu17 -Wpedantic -O0" } */ /* { dg-require-effective-target alloca } */ diff --git a/gcc/testsuite/gcc.dg/warn-1.c b/gcc/testsuite/gcc.dg/warn-1.c index 6db4ae5cd6ce..d5acca2b9ae1 100644 --- a/gcc/testsuite/gcc.dg/warn-1.c +++ b/gcc/testsuite/gcc.dg/warn-1.c @@ -1,7 +1,7 @@ /* The compiler used to say passing arg 0 of, which is wrong. */ /* Radar 3069179 */ -/* { dg-options "-O3" } */ +/* { dg-options "-Wno-old-style-definition -O3" } */ static void foo (p) int p; diff --git a/gcc/testsuite/gcc.dg/winline-10.c b/gcc/testsuite/gcc.dg/winline-10.c index 2df5addaebcc..f4d92fae8c56 100644 --- a/gcc/testsuite/gcc.dg/winline-10.c +++ b/gcc/testsuite/gcc.dg/winline-10.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -Winline -fopt-info-optimized-inline=stderr" } */ +/* { dg-options "-Wno-old-style-definition -O2 -Winline -fopt-info-optimized-inline=stderr" } */ struct s { int a; }; diff --git a/gcc/testsuite/gcc.dg/wtr-label-1.c b/gcc/testsuite/gcc.dg/wtr-label-1.c index 78a4d6b0a4b6..bd31d925b77d 100644 --- a/gcc/testsuite/gcc.dg/wtr-label-1.c +++ b/gcc/testsuite/gcc.dg/wtr-label-1.c @@ -2,7 +2,7 @@ Note, gcc should omit these warnings in system header files. Origin: Kaveh R. Ghazi 8/24/2000. */ /* { dg-do compile } */ -/* { dg-options "-Wtraditional" } */ +/* { dg-options "-Wno-old-style-definition -Wtraditional" } */ enum foo1 { a }; struct foo2 { int i; }; diff --git a/gcc/testsuite/gcc.dg/wtr-switch-1.c b/gcc/testsuite/gcc.dg/wtr-switch-1.c index f0381bc5e379..56913ea11a9e 100644 --- a/gcc/testsuite/gcc.dg/wtr-switch-1.c +++ b/gcc/testsuite/gcc.dg/wtr-switch-1.c @@ -2,7 +2,7 @@ Note, gcc should omit these warnings in system header files. By Kaveh R. Ghazi 8/22/2000. */ /* { dg-do compile } */ -/* { dg-options "-Wtraditional" } */ +/* { dg-options "-Wno-old-style-definition -Wtraditional" } */ void testfunc (l) diff --git a/gcc/testsuite/gcc.target/i386/excess-precision-3.c b/gcc/testsuite/gcc.target/i386/excess-precision-3.c index e8e9abc69571..06f248941606 100644 --- a/gcc/testsuite/gcc.target/i386/excess-precision-3.c +++ b/gcc/testsuite/gcc.target/i386/excess-precision-3.c @@ -1,7 +1,7 @@ /* Excess precision tests. Test excess precision is removed when necessary. */ /* { dg-do run } */ -/* { dg-options "-O2 -mfpmath=387 -fexcess-precision=standard" } */ +/* { dg-options "-Wno-old-style-definition -O2 -mfpmath=387 -fexcess-precision=standard" } */ #include #include diff --git a/gcc/testsuite/gcc.target/i386/fma4-256-nmsubXX.c b/gcc/testsuite/gcc.target/i386/fma4-256-nmsubXX.c index 385cd950b971..ef0cf41feaa5 100644 --- a/gcc/testsuite/gcc.target/i386/fma4-256-nmsubXX.c +++ b/gcc/testsuite/gcc.target/i386/fma4-256-nmsubXX.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-require-effective-target fma4 } */ -/* { dg-options "-O2 -mfma4" } */ +/* { dg-options "-std=gnu17 -O2 -mfma4" } */ #include "fma4-check.h" diff --git a/gcc/testsuite/gcc.target/i386/fma4-nmsubXX.c b/gcc/testsuite/gcc.target/i386/fma4-nmsubXX.c index c0bce417e110..82431ea46147 100644 --- a/gcc/testsuite/gcc.target/i386/fma4-nmsubXX.c +++ b/gcc/testsuite/gcc.target/i386/fma4-nmsubXX.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-require-effective-target fma4 } */ -/* { dg-options "-O0 -mfma4" } */ +/* { dg-options "-std=gnu17 -O0 -mfma4" } */ #include "fma4-check.h" diff --git a/gcc/testsuite/gcc.target/i386/nop-mcount.c b/gcc/testsuite/gcc.target/i386/nop-mcount.c index a5f8d27fda43..ee3c97f3a57c 100644 --- a/gcc/testsuite/gcc.target/i386/nop-mcount.c +++ b/gcc/testsuite/gcc.target/i386/nop-mcount.c @@ -1,7 +1,7 @@ /* Test -mnop-mcount */ /* { dg-do compile { target { *-*-linux* && nonpic } } } */ /* { dg-require-effective-target mfentry } */ -/* { dg-options "-pg -mfentry -mrecord-mcount -mnop-mcount" } */ +/* { dg-options "-Wno-old-style-definition -pg -mfentry -mrecord-mcount -mnop-mcount" } */ /* { dg-final { scan-assembler-not "__fentry__" } } */ /* Origin: Andi Kleen */ extern void foobar(char *); diff --git a/gcc/testsuite/gcc.target/i386/pr102627.c b/gcc/testsuite/gcc.target/i386/pr102627.c index 8ab9acaf002f..7e1409236444 100644 --- a/gcc/testsuite/gcc.target/i386/pr102627.c +++ b/gcc/testsuite/gcc.target/i386/pr102627.c @@ -1,6 +1,6 @@ /* PR rtl-optimization/102627 */ /* { dg-do run } */ -/* { dg-options "-O1" } */ +/* { dg-options "-std=gnu17 -O1" } */ int a, f, l, m, q, c, d, g; long b, e; diff --git a/gcc/testsuite/gcc.target/i386/pr106994.c b/gcc/testsuite/gcc.target/i386/pr106994.c index 0803311dc759..b0bf9856d19b 100644 --- a/gcc/testsuite/gcc.target/i386/pr106994.c +++ b/gcc/testsuite/gcc.target/i386/pr106994.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=skylake -Ofast" } */ +/* { dg-options "-std=gnu17 -march=skylake -Ofast" } */ typedef struct { float ymin, ymax; diff --git a/gcc/testsuite/gcc.target/i386/pr68349.c b/gcc/testsuite/gcc.target/i386/pr68349.c index 3c38c3a01f39..b8540e4948b8 100644 --- a/gcc/testsuite/gcc.target/i386/pr68349.c +++ b/gcc/testsuite/gcc.target/i386/pr68349.c @@ -1,6 +1,6 @@ /* PR target/68483 */ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-std=gnu17 -O2" } */ int a, b; unsigned long my_strlen(); diff --git a/gcc/testsuite/gcc.target/i386/pr97313.c b/gcc/testsuite/gcc.target/i386/pr97313.c index 711766b41321..6167a1ff075c 100644 --- a/gcc/testsuite/gcc.target/i386/pr97313.c +++ b/gcc/testsuite/gcc.target/i386/pr97313.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fPIE" } */ +/* { dg-options "-std=gnu17 -O2 -fPIE" } */ /* { dg-require-effective-target pie } */ typedef struct { diff --git a/gcc/testsuite/gcc.target/i386/pr99454.c b/gcc/testsuite/gcc.target/i386/pr99454.c index ba3ffe2cab3d..f46d56da0be5 100644 --- a/gcc/testsuite/gcc.target/i386/pr99454.c +++ b/gcc/testsuite/gcc.target/i386/pr99454.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -w" } */ +/* { dg-options "-std=gnu17 -O -w" } */ struct skb_shared_info { short gso_size; diff --git a/gcc/testsuite/gcc.target/i386/record-mcount.c b/gcc/testsuite/gcc.target/i386/record-mcount.c index 05b4bcba711e..52924e0f2144 100644 --- a/gcc/testsuite/gcc.target/i386/record-mcount.c +++ b/gcc/testsuite/gcc.target/i386/record-mcount.c @@ -1,6 +1,6 @@ /* Test -mrecord-mcount */ /* { dg-do compile { target { *-*-linux* && nonpic } } } */ -/* { dg-options "-pg -mrecord-mcount" } */ +/* { dg-options "-Wno-old-style-definition -pg -mrecord-mcount" } */ /* { dg-final { scan-assembler "mcount_loc" } } */ /* Origin: Andi Kleen */ extern void foobar(char *); diff --git a/libffi/testsuite/libffi.call/va_struct2.c b/libffi/testsuite/libffi.call/va_struct2.c index 56f5b9c75fa3..49359be712ca 100644 --- a/libffi/testsuite/libffi.call/va_struct2.c +++ b/libffi/testsuite/libffi.call/va_struct2.c @@ -33,6 +33,7 @@ test_fn (int n, ...) struct small_tag s2; struct large_tag l; + (void) n; va_start (ap, n); s1 = va_arg (ap, struct small_tag); l = va_arg (ap, struct large_tag); diff --git a/libffi/testsuite/libffi.call/va_struct3.c b/libffi/testsuite/libffi.call/va_struct3.c index 9a27e7fd4a34..c30f9af88940 100644 --- a/libffi/testsuite/libffi.call/va_struct3.c +++ b/libffi/testsuite/libffi.call/va_struct3.c @@ -33,6 +33,7 @@ test_fn (int n, ...) struct small_tag s2; struct large_tag l; + (void) n; va_start (ap, n); s1 = va_arg (ap, struct small_tag); l = va_arg (ap, struct large_tag);