Skip to content

Compiler feature: better error messages for c99 mid-scope or while/for var definitions in c89 #1603

Description

@pachuco

Improvement. Compiler error should say directly when c99 style definition of var is attempted in c89 instead of ambiguous parsing error.

Things like for (int i=0; i < NUM_OPS; i++) { are easy to spot.
But then float tapsL[4] = {0}; mid scope had me scratching my head wondering if that is c89-valid initialization, until my slow brain caught up and realized I am not doing it at top of scope.
Derp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions