This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C] Fix PR57258: unused variable warning is emitted for volatile variables
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Mingjie Xing <mingjie dot xing at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 6 Nov 2013 10:37:04 +0100
- Subject: Re: [C] Fix PR57258: unused variable warning is emitted for volatile variables
- Authentication-results: sourceware.org; auth=none
- References: <CADNgcEwhF9u2S=f3GdLtWo98BBQs-BVdzRh7-mspQHBAHhUYaw at mail dot gmail dot com>
On Wed, Nov 6, 2013 at 8:40 AM, Mingjie Xing <mingjie.xing@gmail.com> wrote:
> Hi,
>
> Changes:
>
> * c/c-decl.c (pop_scope): Skip volatile variables while emit
> warnings for unused variables.
>
> Tested on i686-pc-linux-gnu.
>
> OK?
You miss a testcase.
Also why should the warning be omitted for unused automatic
volatile variables? They cannot be used in any way.
Richard.
> Mingjie