c++ - Non virtual thunk on gcc 7.2 sometimes too big -
i try migrate gcc 7.2 gcc 4.9 (gcc-arm-none-eabi, -o2). code builds successfully, result program bigger on gcc 4.9.
i make investigation , realize, size of "non virtual thunk on xxx" big, if overriding function defined in class:
struct ia { virtual void fa() = 0; }; struct ib { virtual void fb() = 0; }; struct c : ia, ib { void fa() override {} void fb() override // if place definition here, // size of "non virtual thunk c::fb()" same, function }; // if place definition outside class, // size of non virtual thunk 6-8 bytes, same in gcc4.9
there may option prevents such inlining?
Comments
Post a Comment