diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-12-03 01:27:43 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2019-12-03 01:27:43 +0000 |
commit | 85d1195708cf977bd90afeb9ad51aba085993fb7 (patch) | |
tree | e6654e02617080350ee0156781d32dfc272029da /gcc/tree-ssa.c | |
parent | b650026dff124049729faf9fefa66ff0f0effceb (diff) | |
download | gcc-85d1195708cf977bd90afeb9ad51aba085993fb7.zip gcc-85d1195708cf977bd90afeb9ad51aba085993fb7.tar.gz gcc-85d1195708cf977bd90afeb9ad51aba085993fb7.tar.bz2 |
Diagnose use of [*] in old-style parameter definitions (PR c/88704).
GCC wrongly accepts [*] in old-style parameter definitions because
because parm_flag is set on the scope used for those definitions and,
unlike the case of a prototype in a function definition, there is no
subsequent check to disallow this invalid usage. This patch adds such
a check. (At this point we don't have location information for the
[*], so the diagnostic location isn't ideal.)
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
PR c/88704
gcc/c:
* c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
old-style parameter definitions.
gcc/testsuite:
* gcc.dg/vla-25.c: New test.
From-SVN: r278917
Diffstat (limited to 'gcc/tree-ssa.c')
0 files changed, 0 insertions, 0 deletions