This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -Wunused-but-set* with VLAs (PR c/43981)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 May 2010 19:01:48 +0000 (UTC)
- Subject: Re: [PATCH] Fix -Wunused-but-set* with VLAs (PR c/43981)
- References: <20100504185252.GH2817@tyan-ft48-01.lab.bos.redhat.com>
On Tue, 4 May 2010, Jakub Jelinek wrote:
> Hi!
>
> If VLA length is a variable rather than say expression involving variables,
> we forgot to mark that variable DECL_READ_P.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux. Ok for
> trunk?
>
> 2010-05-04 Jakub Jelinek <jakub@redhat.com>
>
> PR c/43981
> * c-parser.c (c_parser_direct_declarator_inner): Call mark_exp_read
> on dimen.
>
> * gcc.dg/Wunused-var-8.c: New test.
OK.
--
Joseph S. Myers
joseph@codesourcery.com