ChipTuner on Nostr: True but I think even -Wall -Werror on all the compilers I've worked with whine about ...
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.
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.