Commit c321d80
committed
Fix variable initialization due to jump bypassing it
This fixes the following error in mingw gcc toolchain. Also clang
also have same error.
src/_tkagg.cpp:274:26: note: crosses initialization of 'bool tk_ok'
274 | bool tcl_ok = false, tk_ok = false;
| ^~~~~
src/_tkagg.cpp:274:10: note: crosses initialization of 'bool tcl_ok'
274 | bool tcl_ok = false, tk_ok = false;
| ^~~~~~
According to C++ standard (6.7.3):
It is possible to transfer into a block, but not in a way that bypasses
declarations with initialization. A program that jumps from a point where
a variable with automatic storage duration is not in scope to a point
where it is in scope is ill-formed unless the variable has scalar type...1 parent 3699ff3 commit c321d80
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
0 commit comments