Skip to content

goto-cc fails to parse enum/struct/unions with C23 attribute sequences #8671

Open
@archigup

Description

@archigup

For example, the following code fails to parse:

enum [[nodiscard]] error_t {
  A,
};

int main() {
}

The error output is:

test.c:2:1: error: syntax error before '['
 enum [[nodiscard]] error_t {
PARSING ERROR

This also fails in the exact same way for structs or unions with an attribute sequence.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions