https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
Ivan Sorokin <vanyacpp at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vanyacpp at gmail dot com --- Comment #1 from Ivan Sorokin <vanyacpp at gmail dot com> --- I experienced the same issue on GCC 5.3.0. I made a minimal reprocase for the issue. struct mytype { void f() { value = 42; } unsigned value; }; void foo() { mytype().f(); } $ g++ -Wpadded -fsanitize=undefined 2.cpp 2.cpp: In member function ‘void mytype::f()’: 2.cpp:3:10: warning: padding struct size to alignment boundary [-Wpadded] void f() ^ 2.cpp: In function ‘void foo()’: 2.cpp:11:6: warning: padding struct size to alignment boundary [-Wpadded] void foo() ^