pret / pokeemerald

Decompilation of Pokémon Emerald
2.28k stars 2.55k forks source link

[preproc] support C23 enum underlying type syntax #2043

Closed mrgriffin closed 3 weeks ago

mrgriffin commented 3 weeks ago

Introduces support for the C23 underlying type enum syntax. We wouldn't be able to use that syntax with agbcc, but it's potentially helpful for projects which exclusively use make modern (e.g. Expansion from v1.10 onward).

The do-while loop is to support things like enum : unsigned char { ... };, albeit I don't expect we'll see anything like that in practice.

GriffinRichards commented 3 weeks ago

I'm ignoring the build failure here -- it's not the PR, it's just that the runner's OS updated to Ubuntu 24.04 (which broke some assumptions about libpng that are now fixed)