When compiling with gcc -std=c2x, the following errors occur [excerpt]:
PureDOOM.h: At top level:
PureDOOM.h:24830:6: error: conflicting types for 'A_Fall'; have 'void(mobj_t *)' {aka 'void(struct mobj_s )'}
24830 | void A_Fall(mobj_t actor);
| ^~~~~~
PureDOOM.h:16525:6: note: previous declaration of 'A_Fall' with type 'void(void)'
16525 | void A_Fall();
| ^~~~~~
PureDOOM.h:24831:6: error: conflicting types for 'A_Fire'; have 'void(mobj_t *)' {aka 'void(struct mobj_s )'}
24831 | void A_Fire(mobj_t actor);
| ^~~~~~
PureDOOM.h:16538:6: note: previous declaration of 'A_Fire' with type 'void(void)'
16538 | void A_Fire();
| ^~~~~~
PureDOOM.h:24832:6: error: conflicting types for 'A_ReFire'; have 'void(player_t *, pspdef_t *)' {aka 'void(struct player_s , pspdef_t )'}
24832 | void A_ReFire(player_t player, pspdef_t psp);
| ^~~~~~~~
PureDOOM.h:16504:6: note: previous declaration of 'A_ReFire' with type 'void(void)'
16504 | void A_ReFire();
| ^~~~~~~~
PureDOOM.h:24833:6: error: conflicting types for 'A_SpawnFly'; have 'void(mobj_t *)' {aka 'void(struct mobj_s )'}
24833 | void A_SpawnFly(mobj_t mo);
| ^~~~~~~~~~
PureDOOM.h:16571:6: note: previous declaration of 'A_SpawnFly' with type 'void(void)'
16571 | void A_SpawnFly();
And this kind of is to be expected: We do not have function overloading in C. I wonder why older GCC allows for it.
When compiling with gcc -std=c2x, the following errors occur [excerpt]:
And this kind of is to be expected: We do not have function overloading in C. I wonder why older GCC allows for it.