[Bug analyzer/106441] Analyzer has some issues with nested functions extension to C

2022-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106441 --- Comment #4 from Andrew Pinski --- Oh I didn't mention what __builtin_dwarf_cfa was for. It is used for debugging really. So it is easy to find where the function was nested into.

[Bug analyzer/106441] Analyzer has some issues with nested functions extension to C

2022-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106441 --- Comment #3 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > __analyzer_callee_test_3 (int a, int b, int (**out_fn) (int)) > { > int square (int z) { return z * z; } > > *out_fn = square; > > This really should be wa

[Bug analyzer/106441] Analyzer has some issues with nested functions extension to C

2022-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106441 --- Comment #2 from Andrew Pinski --- __analyzer_callee_test_3 (int a, int b, int (**out_fn) (int)) { int square (int z) { return z * z; } *out_fn = square; This really should be warning that the assignment of the nested function is escapi

[Bug analyzer/106441] Analyzer has some issues with nested functions extension to C

2022-07-25 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106441 --- Comment #1 from David Malcolm --- Above example on Compiler Explorer: https://godbolt.org/z/Pv1GoonE6