https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83397
Bug ID: 83397 Summary: void f() { } has zero arguments Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: izaberina at gmail dot com Target Milestone: --- https://godbolt.org/g/8ZcWKk according to c11 6.7.6.3, function prototypes without arguments don't specify anything about their parameters gcc is assuming that f1 takes an unspecified number of arguments, and as such it's treating it as potentially vararg, and that's (probably) why it clears eax before calling it in my understanding, this requirement only applies to prototypes and not to function definitions furthermore, the function is static and gcc is definitely able to see what it does so it's not needed either way