On Tue, Oct 8, 2024 at 4:56 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > > Just by the way, you can't use anonymous structs or unions in C99 > (that was added to C11), but most compilers accept them silently > unless you use eg -std=c99. Some buildfarm animal or other would > bleat about that (ask me how I know), but out CI doesn't pick it up > :-( Maybe we should fix that. That's why you see a lot of code > around that accesses unions through a member with a name like "u", > because the author was shaking her fist at the god of standards and > steadfastly refusing to think of a name. It's a shame in cases where > you want to retrofit a union into existing code without having to > adjust the code that accesses one of the members...
Wow, that is terrible news. I fact-checked this with ast-grep, and you are right -- we don't use anonymous unions or structs. Perhaps this isn't the time or place but 1) I was under the impression we sometimes did things not allowed in C99 if they were really useful 2) remind me what we are waiting for to die so that we can use features from C11? - Melanie