https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106406

--- Comment #4 from marshal <chumarshal at foxmail dot com> ---
(In reply to marshal from comment #0)
> int main()
> {
>     int i = 4;
>     for (_Static_assert (3, "This is a three"); i < 7; i++) {
>         i += 2;
>     }
>  }
> 
> 
> Gcc can build successfully, but it does not follow C spec:
> 
> 6.8.5 Iteration statements
> (Constraints)
> The declaration part of a for statement shall only declare identifiers for
> objects having storage class auto or register.

/*
 * (c) Copyright 2016-2021 by Solid Sands B.V.,
 *     Amsterdam, the Netherlands. All rights reserved.
 *     Subject to conditions in the RESTRICTIONS file.
 */

Reply via email to