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:
<https://github.com/libffi/libffi/pull/861>.
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 <https://github.com/libffi/libffi/pull/861>.
/* { dg-do compile } */
/* { dg-options "-Wcast-function-type" } */
+/* { dg-additional-options "-std=gnu17" { target c } } */
int f(long);
/* { dg-options "-Wformat" } */
+/* { dg-additional-options "-std=gnu17" { target c } } */
int main (int argc, char **argv)
{
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" { target c } } */
#include <stdarg.h>
/* Mismatching decl of foo. */
+/* { dg-additional-options "-std=gnu17" { target c } } */
int foo ();
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 } */
/* 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. */
/* 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
/* PR c/6940 */
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-old-style-definition" { target c } } */
/* Test -Wsizeof-array-argument warning. */
/* { 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;
/* { 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;
/* http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01307.html */
+/* { dg-additional-options "-std=gnu17" } */
typedef struct xdef xdef;
struct xdef
+/* { dg-additional-options "-std=gnu17" } */
+
extern int foobar1 ();
typedef struct
+/* { dg-additional-options "-std=gnu17" } */
+
char *e ();
#define SET \
+/* { dg-additional-options "-std=gnu17" } */
+
extern int getch();
extern int class();
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target trampolines } */
typedef __SIZE_TYPE__ size_t;
/* { 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;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
extern char *globerr;
char **ftpglob();
// { 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;
/* PR tree-optimization/47967 */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target untyped_assembly } */
extern void abort (void);
/* { 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)
/* 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;
-/* { dg-options "-fno-early-inlining" } */
+/* { dg-options "-std=gnu17 -fno-early-inlining" } */
/* { dg-require-effective-target non_strict_prototype } */
void
/* PR middle-end/89663 */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target non_strict_prototype } */
int irint ();
+/* { dg-additional-options "-std=gnu17" } */
+
enum { false, true } a;
int b, c, d, e, f;
int fn3();
-/* { dg-additional-options "-fpermissive -fcommon" } */
+/* { dg-additional-options "-std=gnu17 -fpermissive -fcommon" } */
/* { dg-require-effective-target non_strict_prototype } */
struct S0 {
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target non_strict_prototype } */
void
-/* { dg-additional-options "-fpermissive" } */
+/* { dg-additional-options "-std=gnu17 -fpermissive" } */
long long
xlrandom ()
-/* { dg-additional-options "-fpermissive" } */
+/* { dg-additional-options "-std=gnu17 -fpermissive" } */
void foo (), bar (), baz ();
int main ()
/* { dg-require-effective-target int32plus } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-skip-if "pointers can be truncated" { m32c-*-* } } */
/* Extracted from GDB sources. */
/* derived from PR optimization/11440 */
+/* { dg-additional-options "-std=gnu17" } */
extern void abort (void);
extern void exit (int);
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target untyped_assembly } */
extern void abort (void);
/* PR rtl-optimization/91347 */\r
/* Reported by John David Anglin <danglin@gcc.gnu.org> */\r
+/* { dg-additional-options "-std=gnu17" } */\r
/* { dg-require-effective-target int32plus } */\r
\r
typedef unsigned short __u16;\r
-/* { dg-options "-fwrapv" } */
+/* { dg-options "-Wno-old-style-definition -fwrapv" } */
extern void abort (void);
extern void exit (int);
+/* { dg-additional-options "-std=gnu17" } */
+
void abort (void);
void exit (int);
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target label_values } */
/* { dg-require-stack-size "4000" } */
}
}
+lappend additional_flags "-std=gnu17"
+
return 0
}
}
+lappend additional_flags "-std=gnu17"
+
return 0
}
}
+lappend additional_flags "-std=gnu17"
+
return 0
--- /dev/null
+lappend additional_flags "-std=gnu17"
+return 0
--- /dev/null
+lappend additional_flags "-std=gnu17"
+return 0
--- /dev/null
+lappend additional_flags "-std=gnu17"
+return 0
/* Source: Neil Booth, from PR # 115. */
+/* { dg-additional-options "-std=gnu17" } */
int false()
{
+/* { dg-additional-options "-std=gnu17" } */
+
#include <stdio.h>
#include <stdint.h>
+/* { dg-additional-options "-std=gnu17" } */
+
extern int ok (int);
extern void exit ();
static int gen_x86_64_shrd (int);
+/* { dg-additional-options "-std=gnu17" } */
+
extern void abort (void);
static void something();
+/* { dg-additional-options "-std=gnu17" } */
+
long (*extfunc)();
static inline void lstrcpynW( short *d, const short *s, int n )
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 <stdarg.h>
/* { 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);
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;
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 *);
floating-point registers on SPARC64. */
/* { dg-do assemble } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
extern int foo1();
extern int foo2();
/* PR c/17023 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
void
f(a, b)
/* 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 {
/* { dg-do compile } */
/* { dg-require-profiling "-fprofile-generate" } */
-/* { dg-options "-O2 -fprofile-generate" } */
+/* { dg-options "-std=gnu17 -O2 -fprofile-generate" } */
void lookup ();
int hash ();
/* { 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
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-crossjumping" } */
+/* { dg-options "-std=gnu17 -O2 -fno-crossjumping" } */
/* { dg-require-effective-target alloca } */
int bar1 ();
/* 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)
{
/* 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;
/* 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;
/* 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;
/* 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" } */
/* 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;
-/* { dg-options "-Wc++-compat" } */
+/* { dg-options "-std=gnu17 -Wc++-compat" } */
_Bool foo; /* This is okay. */
int bool; /* { dg-warning "5:keyword" } */
/* { dg-do compile } */
-/* { dg-options "-fpermissive -Wdouble-promotion" } */
+/* { dg-options "-std=gnu17 -fpermissive -Wdouble-promotion" } */
#include <stddef.h>
/* { 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);
/* { dg-do compile } */
-/* { dg-options "-fpermissive" } */
+/* { dg-options "-std=gnu17 -fpermissive" } */
static l; /* { dg-warning "type defaults to" } */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17 " } */
static l; /* { dg-error "type defaults to" } */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-std=gnu17 -pedantic-errors" } */
static l; /* { dg-error "type defaults to" } */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors -Wno-implicit-int" } */
+/* { dg-options "-std=gnu17 -pedantic-errors -Wno-implicit-int" } */
static l;
/* { 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" } */
/* { dg-do compile } */
-/* { dg-options "-Wno-implicit -Wimplicit-int" } */
+/* { dg-options "-std=gnu17 -Wno-implicit -Wimplicit-int" } */
static l; /* { dg-error "type defaults to" } */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-std=gnu17 -pedantic-errors" } */
void f (int, ...);
/* 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;
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 ();
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 ();
/* { 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. */
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;
/* 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;
/* 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;
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. */
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. */
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 } */
-/* { dg-additional-options "-Wno-implicit-int" } */
+/* { dg-additional-options "-std=gnu17 -Wno-implicit-int" } */
extern void foo (void *) __attribute__((nonnull));
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-skip-if "PR112705" { hppa*64*-*-* } } */
int a, b;
void d();
+/* { dg-additional-options "-std=gnu17" } */
+
#include <stdio.h>
/* Solaris needs this for <unistd.h> to declare getpass. */
/* { 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)
-/* { dg-additional-options "-fanalyzer-transitivity" } */
+/* { dg-additional-options "-std=gnu17 -fanalyzer-transitivity" } */
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
extern void g();
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
#include "../../torture/pr57330.c"
lost in forming composite types. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { 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];
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
#define CONCAT_(A,B) A ## B
#define CONCAT(A,B) CONCAT_(A,B)
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"
extern void abort ();
-extern void exit ();
+extern void exit (int);
void bad ()
{
/* 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;
/* { 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))
prototype than the actual one. */
/* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-std=gnu17 -O3" } */
int foo1(int);
int foo2();
/* { dg-do compile } */
-/* { dg-options "-fpermissive -Wall" } */
+/* { dg-options "-std=gnu17 -fpermissive -Wall" } */
/* Validate expected warnings and errors. */
#define U __attribute__((unused))
-/* { dg-options "-O -Wno-psabi" } */
+/* { dg-options "-std=gnu17 -O -Wno-psabi" } */
#ifdef __x86_64__
-/* { dg-options "-O -Wno-psabi" } */
+/* { dg-options "-std=gnu17 -O -Wno-psabi" } */
#ifdef __x86_64__
-/* { dg-options "-O -msse2" } */
+/* { dg-options "-std=gnu17 -O -msse2" } */
#include "union-m128-1.h"
/* { dg-do compile } */
-/* { dg-options "-O3 -gdwarf" } */
+/* { dg-options "-std=gnu17 -O3 -gdwarf" } */
void f(int p) {}
int g() {
/* { 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. */
/* { 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. */
/* { 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" } */
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);
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" } */
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" } */
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'" } */
/* Origin: Joseph Myers <jsm@polyomino.org.uk>, based on
PR c/6024 from Richard Earnshaw <rearnsha@arm.com> */
/* { dg-do compile } */
-/* { dg-options "-fpermissive" } */
+/* { dg-options "-std=gnu17 -fpermissive" } */
/* Original test from PR c/6024. */
enum e1 {a, b};
/* Origin: Joseph Myers <jsm@polyomino.org.uk>, based on
PR c/6024 from Richard Earnshaw <rearnsha@arm.com> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
/* Original test from PR c/6024. */
enum e1 {a, b};
/* 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 } */
/* { 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 } */
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)))
/* Test for attribute sentinel. */
/* Origin: Kaveh Ghazi <ghazi@caip.rutgers.edu> */
/* { dg-do compile } */
-/* { dg-options "-Wformat" } */
+/* { dg-options "-std=gnu17 -Wformat" } */
#include <stddef.h> /* For NULL, which must be (ptr)0. */
/* 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)) \
/*
{ dg-do compile }
-{ dg-options "-W -Wall" }
+{ dg-options "-Wno-old-style-definition -W -Wall" }
*/
/* { 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;
/* 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);
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
typedef int a;
typedef int b;
/* { 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;
/* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-std=gnu17 -O3" } */
int a, b, c, d, *e;
void f(int h) {
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
struct S1 {
signed f0;
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-early-inlining -fipa-sra" } */
+/* { dg-options "-std=gnu17 -O2 -fno-early-inlining -fipa-sra" } */
struct S
{
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-Wno-old-style-definition -O2" } */
void i();
short a;
/* { 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
{
/* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-std=gnu17 -O3" } */
typedef struct a a;
struct a {
/* PR ipa/96482 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
int i2c_transfer();
void _dev_err();
-/* { dg-options "-Wno-stringop-overread" } */
+/* { dg-options "-std=gnu17 -Wno-stringop-overread" } */
typedef struct HDC__ { int unused; } *HDC;
typedef struct HFONT__ { int unused; } *HFONT;
+/* { dg-options "-std=gnu17" } */
#include "20091015-1_a.h"
#include "20091015-1_b.h"
void foo ();
+/* { dg-options "-std=gnu17" } */
int a;
void exit_error();
void register_dccp() { exit_error(a); }
-/* { dg-options "-fpermissive" } */
+/* { dg-options "-std=gnu17 -fpermissive" } */
int *b;
void *d;
int c;
/* { 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; };
+/* { 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 } */
accepted. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
void
f(a)
/* PR c/71266 */
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-old-style-definition" } */
int fn1 (a)
enum b { /* { dg-warning "empty declaration" } */
* internal compiler error. */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
int main()
{
* user error, not internal compiler error. */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
int main()
{
/* 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" } */
/* 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" } */
/* 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" } */
+/* { dg-additional-options "-std=gnu17" } */
+
#include <stdarg.h>
void
/* 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);
/* 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" } */
/* 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" } */
Mismatched qualifiers used to be wrongly forbidden. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
void f1() {}
void f1(void); /* { dg-warning "prototype for 'f1' follows non-prototype definition" } */
C99 6.7.5.3); the precise rules are unclear. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
struct s;
void f (struct s);
(). */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { 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'" } */
-/* { 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
-/* { 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. */
-/* { 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
-/* { 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
-/* { 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. */
-/* { 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
net/ethtool/ioctl.c */
/* { dg-do compile } */
-/* { dg-options "-fanalyzer" } */
+/* { dg-options "-std=gnu17 -fanalyzer" } */
/* { dg-require-effective-target analyzer } */
typedef signed char __s8;
/* { dg-do compile } */
/* Origin: Martin Uecker <uecker@eecs.berkeley.edu> */
-/* { 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]) { }
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-std=gnu17 -pedantic-errors" } */
/* Origin: Martin Uecker <uecker@eecs.berkeley.edu> */
void tvoid(void* x);
void transpose0(double* out, const double* in) { }
/* { dg-do compile } */
-/* { dg-options "-fpermissive" } */
+/* { dg-options "-std=gnu17 -fpermissive" } */
static inline int __attribute__((__always_inline__))
foo ()
/* { dg-do compile } */
-/* { dg-options "-O1 -w" } */
+/* { dg-options "-std=gnu17 -O1 -w" } */
char c;
void *memset();
/* { dg-do compile } */
-/* { dg-options "-ftrivial-auto-var-init=zero" } */
+/* { dg-options "-std=gnu17 -ftrivial-auto-var-init=zero" } */
void bar();
-/* { 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];
// { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-std=gnu17 -O2" }
#include <stdint.h>
#include <stdio.h>
/* { 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;
/* 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); } \
/* { 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;
/* PR c/105972 */
/* { dg-do compile } */
-/* { dg-options "-O2 -g" } */
+/* { dg-options "-Wno-old-style-definition -O2 -g" } */
__attribute__((optimize (0))) int
foo (void)
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "-std=gnu17 -O" } */
#if __SIZEOF_INT__ < 4
#define int __INT32_TYPE__
/* PR tree-optimization/111407*/
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
enum { SEND_TOFILE } __sigsetjmp();
void fclose();
void foldergets();
/* { 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);
/* 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,
diagnosed. Bug 17188. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
struct s0 { }; /* { dg-message "note: originally defined here" } */
struct s0;
/* 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\\)" } */
/* 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\\)" } */
/* 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\\)" } */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-vectorize" } */
+/* { dg-options "-Wno-old-style-definition -O2 -ftree-vectorize" } */
struct funny_match
{
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
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
int GetMouseButton ();
int ParsePos ();
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
-/* { dg-options "-O2 -ftracer -fPIC" } */
+/* { dg-options "-std=gnu17 -O2 -ftracer -fPIC" } */
struct displayfuncs {
void (*init) ();
/* { 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:";
/* { dg-do compile } */
-/* { dg-options "-O3 -Werror" } */
+/* { dg-options "-std=gnu17 -O3 -Werror" } */
int value_compare ();
/* { 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" } */
/* 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 ();
/* 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"
/* PR rtl-optimization/38245 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
#include "pr38245-3.h"
/* 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;
/* 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 *);
/* 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);
/* 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];
/* { 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
{
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-Wno-old-style-definition -O2" } */
struct _wincore
{
/* PR middle-end/63762 */
/* { dg-do assemble } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
#include <stdlib.h>
/* 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;
/* { 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*-*-* } } */
/* PR c/68533 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
struct T { int t; };
/* 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 ()
-/* { dg-options "-fdiagnostics-show-caret" } */
+/* { dg-options "-Wno-old-style-definition -fdiagnostics-show-caret" } */
int i /* { dg-error "6: expected ';' before 'int'" } */
int j;
/* PR c/79983 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
struct S;
struct S { int i; }; /* { dg-message "originally defined here" } */
/* 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 ();
/* { dg-do compile } */
-/* { dg-options "-Wabsolute-value" } */
+/* { dg-options "-std=gnu17 -Wabsolute-value" } */
int a;
int abs();
/* 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)
/* 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); } \
/* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "-std=gnu17 -O" } */
extern double copysign ();
double foo (double x)
/* PR c/93573 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
void bar ();
/* 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;
/* PR c/94705 */
/* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-std=gnu17" } */
void foo ();
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fre" } */
+/* { dg-options "-std=gnu17 -O2 -fdump-tree-fre" } */
void a();
void b() {
/* PR middle-end/96335 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
void bar (int, void *) __attribute__((__access__(__read_only__, 2)));
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
typedef enum { LangC } cLanguage;
typedef enum { FunctionOneArg, FunctionStandard } cFunctionType;
/* PR c/97882 - Segmentation Fault on improper redeclaration of function
{ dg-do compile }
- { dg-options "" } */
+ { dg-options "-std=gnu17" } */
// Check pointer declaration incompatibiliies.
/* { dg-do compile } */
-/* { dg-options "-O2 -g -w" } */
+/* { dg-options "-std=gnu17 -O2 -g -w" } */
/* { dg-require-effective-target alloca } */
static int foo ();
/* { dg-do compile } */
-/* { dg-options "-O2 -g -w" } */
+/* { dg-options "-std=gnu17 -O2 -g -w" } */
static int foo ();
union. Bug 27697 from Frank Victor Fischer. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "-pedantic -Wdiscarded-array-qualifiers" } */
+/* { dg-options "-std=gnu17 -pedantic -Wdiscarded-array-qualifiers" } */
struct s {
int a;
/* { 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);
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
/* { 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));
/* Test __bf16. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options bfloat16 } */
/* { dg-require-effective-target bfloat16_runtime } */
/* Test _Float128. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float128 } */
/* { dg-require-effective-target float128_runtime } */
/* Test _Float128x. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float128x } */
/* { dg-require-effective-target float128x_runtime } */
/* Test _Float16. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float16 } */
/* { dg-require-effective-target float16_runtime } */
/* Test _Float32. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float32 } */
/* { dg-require-effective-target float32_runtime } */
/* Test _Float32x. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float32x } */
/* { dg-require-effective-target float32x_runtime } */
/* Test _Float64. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float64 } */
/* { dg-require-effective-target float64_runtime } */
/* Test _Float64x. */
/* { dg-do run } */
-/* { dg-options "" } */
+/* { dg-options "-Wno-old-style-definition" } */
/* { dg-add-options float64x } */
/* { dg-require-effective-target float64x_runtime } */
/* { 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" } { "" } } */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
void foo();
/* { dg-do compile } */
-/* { dg-additional-options "-Wno-stringop-overread" } */
+/* { dg-additional-options "-Wno-old-style-definition -Wno-stringop-overread" } */
int foo (fmt)
char* fmt;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
int bar (foo, a)
int (**foo) ();
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-old-style-definition" } */
int foo (fmt)
char* fmt;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
typedef int UInt;
UInt skeletal_RI5_instr;
/* { 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,
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
extern void f();
char a[1][1], b;
/* { 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__)));
/* { dg-do compile } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-std=gnu17 -pedantic" } */
enum err {
err_IO = 0x8a450000, /* { dg-warning "int" } */
-/* { dg-options "-fno-tree-sra" } */
+/* { dg-options "-std=gnu17 -fno-tree-sra" } */
typedef unsigned char byte;
typedef unsigned int uint;
typedef int bool;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
int sigemptyset (int *);
int sigaddset(int, int);
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
struct T;
typedef void F(void);
/* { dg-do assemble } */
+/* { dg-additional-options "-Wno-old-style-definition" } */
void (*foo[6][6]) (int);
void bar (hdR)
/* 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 ();
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
extern void g (void);
int _setjmp();
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
void foo (int a)
{}
/* { 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 } */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
struct singlecomplex { float real, imag ; } ;
struct doublecomplex { double real, imag ; } ;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
typedef struct
{
/* { dg-do compile } */
-/* { dg-additional-options "-w" } */
+/* { dg-additional-options "-std=gnu17 -w" } */
int a[1];
void *memcpy();
/* { 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. */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target int32plus } */
struct
+/* { dg-additional-options "-std=gnu17" } */
+
_Complex a;
void fn1 ();
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-prune-output "\\\[-Wbuiltin-declaration-mismatch" } */
void *ext2fs_resize_mem_p;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
typedef float real;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
struct e {
int (*f)();
/* PR ipa/77677 */
/* { dg-do compile } */
-/* { dg-options "-fpermissive -w" } */
+/* { dg-options "-std=gnu17 -fpermissive -w" } */
enum machine_mode { MAX_MACHINE_MODE };
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-old-style-definition" } */
int a, b, c;
char d;
/* { dg-do link } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-alias "" } */
int bar () __attribute__ ((alias ("foo")));
/* PR tree-optimization/80612 */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
struct obstack *a;
struct obstack {
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
int b, d, f, h;
char e;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
unsigned a;
short b;
/* 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();
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
typedef struct a {
struct a *b;
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
long a;
long *b;
-/* { 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;
/* { dg-do compile } */
+/* { dg-additional-options "-Wno-old-style-definition" } */
typedef int a;
typedef char b;
/* { 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 <stdlib.h>
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */
extern void abort (void);
/* { 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;
/* { 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;
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */
extern void abort (void);
/* { 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);
/* { 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);
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom2" } */
+/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-dom2" } */
struct rtx_def;
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */
struct rtx_def;
/* { 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;
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-Wno-old-style-definition -O1 -fdump-tree-dom2" } */
union tree_node;
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-rtl-expand-details" } */
+/* { dg-options "-Wno-old-style-definition -O2 -fdump-rtl-expand-details" } */
union tree_node;
/* { 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[];
/* { 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;
/* { 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);
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-vrp1" } */
void
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-Wno-old-style-definition -O2 -fdump-tree-vrp1" } */
extern void abort (void);
/* { 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;
/* { 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;
/* { 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;
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
/* { 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;
/* { 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. */
/* { 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;
/* { 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;
// { dg-do compile }
-// { dg-options "-O1 -w" }
+// { dg-options "-std=gnu17 -O1 -w" }
typedef void *SCM;
void set_socket_io_ports();
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
typedef struct
{
/* { dg-do compile } */
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-std=gnu17 -O2 -w" } */
int a, c, d;
float b;
/* { 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. */
/* 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;
/* 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;
/* 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;
/* PR sanitizer/81223 */
/* { dg-do compile } */
-/* { dg-options "-fsanitize=undefined" } */
+/* { dg-options "-std=gnu17 -fsanitize=undefined" } */
void bar ();
/* { 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. */
/* { 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. */
/* 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;
/* 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;
May be a real bug in CSE. */
/* { dg-do compile } */
-/* { dg-options "-Wall" } */
+/* { dg-options "-Wno-old-style-definition -Wall" } */
struct tree
{
May be a real bug in CSE. */
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall" } */
+/* { dg-options "-O2 -Wall -Wno-old-style-definition" } */
struct tree
{
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" } */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
enum { SEG_THIN_POOL } read_only;
struct {
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
struct {
int *end_info;
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target vect_int } */
/* PR tree-optimization/67682. */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_perm } */
/* PR tree-optimization/67682. */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_int_mult } */
/* PR tree-optimization/67682. */
/* { 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 } */
/* { dg-do compile } */
+/* { dg-additional-options "-std=gnu17" } */
/* { dg-add-options vect_early_break } */
/* { dg-require-effective-target vect_early_break } */
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 <sys/mman.h>
#include <stdio.h>
/* PR101838 */
/* { dg-do run } */
-/* { dg-options "-Wpedantic -O0" } */
+/* { dg-options "-std=gnu17 -Wpedantic -O0" } */
/* { dg-require-effective-target alloca } */
/* 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;
/* { 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; };
Note, gcc should omit these warnings in system header files.
Origin: Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/24/2000. */
/* { dg-do compile } */
-/* { dg-options "-Wtraditional" } */
+/* { dg-options "-Wno-old-style-definition -Wtraditional" } */
enum foo1 { a };
struct foo2 { int i; };
Note, gcc should omit these warnings in system header files.
By Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/22/2000. */
/* { dg-do compile } */
-/* { dg-options "-Wtraditional" } */
+/* { dg-options "-Wno-old-style-definition -Wtraditional" } */
void
testfunc (l)
/* 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 <float.h>
#include <stdarg.h>
/* { dg-do run } */
/* { dg-require-effective-target fma4 } */
-/* { dg-options "-O2 -mfma4" } */
+/* { dg-options "-std=gnu17 -O2 -mfma4" } */
#include "fma4-check.h"
/* { dg-do run } */
/* { dg-require-effective-target fma4 } */
-/* { dg-options "-O0 -mfma4" } */
+/* { dg-options "-std=gnu17 -O0 -mfma4" } */
#include "fma4-check.h"
/* 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 *);
/* 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;
/* { dg-do compile } */
-/* { dg-options "-march=skylake -Ofast" } */
+/* { dg-options "-std=gnu17 -march=skylake -Ofast" } */
typedef struct {
float ymin, ymax;
/* PR target/68483 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-std=gnu17 -O2" } */
int a, b;
unsigned long my_strlen();
/* { dg-do compile } */
-/* { dg-options "-O2 -fPIE" } */
+/* { dg-options "-std=gnu17 -O2 -fPIE" } */
/* { dg-require-effective-target pie } */
typedef struct {
/* { dg-do compile } */
-/* { dg-options "-O -w" } */
+/* { dg-options "-std=gnu17 -O -w" } */
struct skb_shared_info {
short gso_size;
/* 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 *);
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);
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);