True but I think even -Wall -Werror on all the compilers I've worked with whine about use before assignment.
If you have a function with 40+ lines it's easy to miss where a variable may have been declared. I use unconditional jumps often, so I like to see where variables are declared incase I need to do something with them.
If my variables are declared immediately, I always know they are accessible no matter where I jump to in the function.
But I definitely get the UB of default values. I try to assign variables as the first statement's if possible, and manually assign default/failing values for this reason.
Yeah, -wall -werror fixes many problems.
Actually when using Visual Studio the intellisense even freaks out with accessing structure members after declaration (before assignment) which is proper behavior in C but I guess frowned upon in C++