I know that the ABI calling convention require that function results are returned as integers, even if the function result is known as (short)byte-value.
But if a function with its return is inlined, i can't see any reason to (over)fullfill this convention. At least with optimizing compilation the high-byte-treatement should be omitted. The waste of space and time hits especialy hard in small functions, as just return an ojects property. Unfortunately the superfluous technical overhead must, at least for microcontroler-targets influence design decisions, e.g. inline function versus #define macro, which should be taken on logical facts. This problem is not specific for c++, it also hits C, in any optimazion-level. Excuse me, I couln't find a related bug, but I'm not shure if there is one, though. -- Summary: inlined return not optimized, overfullfills ABI calling convention Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: familie dot glaser at web dot de GCC host triplet: WIN GCC target triplet: AVR http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27771