https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112840
--- Comment #3 from Matheus Afonso Martins Moreira <matheus.a.m.moreira at gmail dot com> --- (In reply to uecker from comment #2) > I would go for a more generic feature where one can specify some invariant / > condition that needs be true when a member of a struct / union is accessed. So the proposed solution is a guard(expr) attribute that causes the compiler to warn the developer if it can't statically determine that expr is true in the appropriate context. This would be great!! Much more flexible than the tag attribute I proposed. How can we make it happen? I've never hacked on GCC before.