I think -Werror=aggregate-return is too aggressive and shouldn't be used. I run into the same problem in https://github.com/geany/geany/pull/1263 where some some functions in ctags return MIOPos which is a tiny structure. I'll prepare a patch to remove this flag from the build - this pull request will then be unnecessary.