https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106406
Bug ID: 106406 Summary: _Static_assert declaration can not be first of for-triplet Product: gcc Version: rust/master Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chumarshal at foxmail dot com Target Milestone: --- 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.