Skip to content

"Initializing non-constant-length array" error when parsing a correct C file. #45

@ehboudjema

Description

@ehboudjema

I have the error :
Error: Initializing non-constant-length array
with the following C code :

typedef enum
{
A = 0,
B = 1
} Enum;

int main (){
char arr[((Enum)1)] = "a";
printf("%s\n",arr);
}

The code above compiles and runs correctly using GCC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions