https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64852
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- C++ has runtime initializers for global variables. The reason why you get an error message for -O1 is due to a glibc header changing the definition of htons between -O1 and -O0. Not a bug.