Skip to content

Fixing enums - #453

Merged
thradams merged 7 commits into
thradams:mainfrom
aalmkainzi:fixing-enum
Jul 27, 2026
Merged

Fixing enums#453
thradams merged 7 commits into
thradams:mainfrom
aalmkainzi:fixing-enum

Conversation

@aalmkainzi

@aalmkainzi aalmkainzi commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

this now works:

enum A
{
    A = 11111111111L
};

static_assert(_Generic(enum A, unsigned long: 1, default: 0));

enum B
{
    B = 11111111111L,
    C = -1
};

static_assert(_Generic(enum B, signed long: 1, default: 0));

this is now rejected:

enum A : signed char
{
    A = 500
};

this is now rejected:

enum A
{
    A
};

enum A : int
{
    A
};

@thradams

Copy link
Copy Markdown
Owner

Unit tests are failing. Self build is failing as well.

@thradams

Copy link
Copy Markdown
Owner

Something comparing enum types i guess

target.h:104:61: error 1020: conflicting types for 'parse_target' (int (const char * targetstr,enum target * target))
 104 |int parse_target(const char* targetstr, enum target* target);

@aalmkainzi

Copy link
Copy Markdown
Contributor Author

Hmmm. I will try to figure it out

@thradams

Copy link
Copy Markdown
Owner

I am pushing my current changes.. and doing some fixes

@aalmkainzi

Copy link
Copy Markdown
Contributor Author

Ok. I will rebase once i fix it

@thradams

Copy link
Copy Markdown
Owner

i am not going to changes more files for now.
Unfortunately github actions is failing on linux but in my machine it pass. :-(

@thradams
thradams merged commit 0ff58be into thradams:main Jul 27, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants