https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86141
--- Comment #12 from ASA <aaron_sami_abassi at hotmail dot com> --- I see what you're saying now. Indeed I compiled it without a main function with g++ -O -S -c gccbug.cpp and it does expand DisplayViewType inline. Thank you for clarifying the context of the optimization issue, good to know.