This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C PATCH for c/85318, missing -Wc90-c99-compat warning with for-init-loop
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Jun 2018 19:10:30 +0000
- Subject: Re: C PATCH for c/85318, missing -Wc90-c99-compat warning with for-init-loop
- References: <20180607170114.GF28085@redhat.com>
On Thu, 7 Jun 2018, Marek Polacek wrote:
> This PR reports that we are not emitting a -Wc90-c99-compat warning
> for a for loop with a declaration. This patch adds it; here we want
> to use pedwarn_c90 which takes care of it.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK. (This wasn't present originally because actually using this construct
in C90 mode produces a hard error as it's problematic without the C99
block scopes - that is, this pedwarn_c90 is needed only for
-Wc90-c99-compat, not for conformance in C90 mode.)
--
Joseph S. Myers
joseph@codesourcery.com