https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71598
--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- The relation definitely is not transitive (so you can't declare the same function to return two different enum types, for example).