Commit 8bb6596
committed
Suppress uninitialized variable warnings for small stack allocations
Add macros to disable and re-enable compiler-specific warnings about
possibly uninitialized variables (`-Wmaybe-uninitialized` for GCC,
`-Wuninitialized` for Clang, and warning C4700 for MSVC). Use these
macros in `_PyEvalFramePushAndInit_Ex()` to suppress false positives
on stack-allocated arrays like `stack_array`.
This also addresses warnings such as the one in `pycore_call.h` when
using `small_stack[_PY_FASTCALL_SMALL_STACK]` that may be flagged by
GCC's `-Wmaybe-uninitialized`.1 parent d47584a commit 8bb6596
2 files changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
202 | 219 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
| 1817 | + | |
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
| |||
1855 | 1856 | | |
1856 | 1857 | | |
1857 | 1858 | | |
| 1859 | + | |
1858 | 1860 | | |
1859 | 1861 | | |
1860 | 1862 | | |
| |||
0 commit comments