https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100653
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > Is there some way there can be warned against such invalid usages? Because > these things are really hard to see on a 'macro' level. Not at the moment, although this could probably be implemented. But a simple rule of thumb is to avoid using scalar_storage_order with unions at all.