]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/c-typeck.c
re PR c/39582 (bad errors for some uses of [*] arrays)
authorJoseph Myers <joseph@codesourcery.com>
Sat, 25 Apr 2009 21:19:09 +0000 (22:19 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 25 Apr 2009 21:19:09 +0000 (22:19 +0100)
commit24070fcb42eca4e9df8129f9c3ffb3cf71379fa5
tree8c910c03d4c980b208b9616acc0764a504105241
parentafdb7762cb3eb4f2e14a0fd3a774008f684210e8
re PR c/39582 (bad errors for some uses of [*] arrays)

PR c/39582
* c-typeck.c (c_expr_sizeof_type): Create a C_MAYBE_CONST_EXPR
with non-null C_MAYBE_CONST_EXPR_PRE if size of a variable-length
type is an integer constant.

testsuite:
* gcc.dg/vla-20.c: New test.

From-SVN: r146787
gcc/ChangeLog
gcc/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vla-20.c [new file with mode: 0644]