mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 02:44:18 +08:00
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: <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>.
This commit is contained in:
parent
6756250fcb
commit
9fb5348e30
@ -1,5 +1,6 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-Wcast-function-type" } */
|
||||
/* { dg-additional-options "-std=gnu17" { target c } } */
|
||||
|
||||
int f(long);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* { dg-options "-Wformat" } */
|
||||
/* { dg-additional-options "-std=gnu17" { target c } } */
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-std=gnu17" { target c } } */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Mismatching decl of foo. */
|
||||
/* { dg-additional-options "-std=gnu17" { target c } } */
|
||||
|
||||
int foo ();
|
||||
|
||||
|
@ -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 } */
|
||||
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* PR c/6940 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-Wno-old-style-definition" { target c } } */
|
||||
|
||||
/* Test -Wsizeof-array-argument warning. */
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern int foobar1 ();
|
||||
|
||||
typedef struct
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
char *e ();
|
||||
|
||||
#define SET \
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern int getch();
|
||||
extern int class();
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target trampolines } */
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern char *globerr;
|
||||
char **ftpglob();
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* PR tree-optimization/47967 */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target untyped_assembly } */
|
||||
|
||||
extern void abort (void);
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-options "-fno-early-inlining" } */
|
||||
/* { dg-options "-std=gnu17 -fno-early-inlining" } */
|
||||
/* { dg-require-effective-target non_strict_prototype } */
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* PR middle-end/89663 */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target non_strict_prototype } */
|
||||
|
||||
int irint ();
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
enum { false, true } a;
|
||||
int b, c, d, e, f;
|
||||
int fn3();
|
||||
|
@ -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 {
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target non_strict_prototype } */
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-additional-options "-fpermissive" } */
|
||||
/* { dg-additional-options "-std=gnu17 -fpermissive" } */
|
||||
|
||||
long long
|
||||
xlrandom ()
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-additional-options "-fpermissive" } */
|
||||
/* { dg-additional-options "-std=gnu17 -fpermissive" } */
|
||||
|
||||
void foo (), bar (), baz ();
|
||||
int main ()
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* derived from PR optimization/11440 */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target untyped_assembly } */
|
||||
extern void abort (void);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* PR rtl-optimization/91347 */
|
||||
/* Reported by John David Anglin <danglin@gcc.gnu.org> */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target int32plus } */
|
||||
|
||||
typedef unsigned short __u16;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-options "-fwrapv" } */
|
||||
/* { dg-options "-Wno-old-style-definition -fwrapv" } */
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
void abort (void);
|
||||
void exit (int);
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-require-effective-target label_values } */
|
||||
/* { dg-require-stack-size "4000" } */
|
||||
|
||||
|
@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] {
|
||||
}
|
||||
}
|
||||
|
||||
lappend additional_flags "-std=gnu17"
|
||||
|
||||
return 0
|
||||
|
@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] {
|
||||
}
|
||||
}
|
||||
|
||||
lappend additional_flags "-std=gnu17"
|
||||
|
||||
return 0
|
||||
|
@ -13,4 +13,6 @@ if [istarget "arm*-*-vxworks*"] {
|
||||
}
|
||||
}
|
||||
|
||||
lappend additional_flags "-std=gnu17"
|
||||
|
||||
return 0
|
||||
|
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.x
Normal file
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4.x
Normal file
@ -0,0 +1,2 @@
|
||||
lappend additional_flags "-std=gnu17"
|
||||
return 0
|
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x
Normal file
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4f.x
Normal file
@ -0,0 +1,2 @@
|
||||
lappend additional_flags "-std=gnu17"
|
||||
return 0
|
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4l.x
Normal file
2
gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-4l.x
Normal file
@ -0,0 +1,2 @@
|
||||
lappend additional_flags "-std=gnu17"
|
||||
return 0
|
@ -1,4 +1,5 @@
|
||||
/* Source: Neil Booth, from PR # 115. */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
int false()
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern int ok (int);
|
||||
extern void exit ();
|
||||
static int gen_x86_64_shrd (int);
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static void something();
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
long (*extfunc)();
|
||||
|
||||
static inline void lstrcpynW( short *d, const short *s, int n )
|
||||
|
@ -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 <stdarg.h>
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 *);
|
||||
|
||||
|
@ -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();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* PR c/17023 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "" } */
|
||||
/* { dg-options "-Wno-old-style-definition" } */
|
||||
|
||||
void
|
||||
f(a, b)
|
||||
|
@ -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 {
|
||||
|
@ -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 ();
|
||||
|
@ -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
|
||||
|
@ -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 ();
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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" } */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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" } */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fpermissive -Wdouble-promotion" } */
|
||||
/* { dg-options "-std=gnu17 -fpermissive -Wdouble-promotion" } */
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fpermissive" } */
|
||||
/* { dg-options "-std=gnu17 -fpermissive" } */
|
||||
|
||||
static l; /* { dg-warning "type defaults to" } */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "" } */
|
||||
/* { dg-options "-std=gnu17 " } */
|
||||
|
||||
static l; /* { dg-error "type defaults to" } */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-pedantic-errors" } */
|
||||
/* { dg-options "-std=gnu17 -pedantic-errors" } */
|
||||
|
||||
static l; /* { dg-error "type defaults to" } */
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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" } */
|
||||
|
||||
|
@ -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" } */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-pedantic-errors" } */
|
||||
/* { dg-options "-std=gnu17 -pedantic-errors" } */
|
||||
|
||||
void f (int, ...);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 ();
|
||||
|
@ -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 ();
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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. */
|
||||
|
@ -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. */
|
||||
|
@ -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 } */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-additional-options "-Wno-implicit-int" } */
|
||||
/* { dg-additional-options "-std=gnu17 -Wno-implicit-int" } */
|
||||
|
||||
extern void foo (void *) __attribute__((nonnull));
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
/* { dg-skip-if "PR112705" { hppa*64*-*-* } } */
|
||||
int a, b;
|
||||
void d();
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Solaris needs this for <unistd.h> to declare getpass. */
|
||||
|
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -1,2 +1,3 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-additional-options "-std=gnu17" } */
|
||||
#include "../../torture/pr57330.c"
|
||||
|
@ -3,7 +3,7 @@
|
||||
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];
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
extern void abort ();
|
||||
extern void exit ();
|
||||
extern void exit (int);
|
||||
|
||||
void bad ()
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
@ -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();
|
||||
|
@ -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))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-options "-O -Wno-psabi" } */
|
||||
/* { dg-options "-std=gnu17 -O -Wno-psabi" } */
|
||||
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-options "-O -Wno-psabi" } */
|
||||
/* { dg-options "-std=gnu17 -O -Wno-psabi" } */
|
||||
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-options "-O -msse2" } */
|
||||
/* { dg-options "-std=gnu17 -O -msse2" } */
|
||||
|
||||
#include "union-m128-1.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3 -gdwarf" } */
|
||||
/* { dg-options "-std=gnu17 -O3 -gdwarf" } */
|
||||
|
||||
void f(int p) {}
|
||||
int g() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user