[Bug middle-end/109395] -Wvla-larger-than has no effect when compiling without optimizations

2023-04-03 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395 --- Comment #9 from Jakub Łukasiewicz --- (In reply to Andrew Pinski from comment #7) > Yes and that is still a VLA in terms of C99 definition ... Indeed, but we only want to prevent automatic VLA, all other instances of VM types are even

[Bug middle-end/109395] -Wvla-larger-than has no effect when compiling without optimizations

2023-04-03 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395 --- Comment #2 from Jakub Łukasiewicz --- (In reply to Andrew Pinski from comment #1) > This is by designed and is even documented: > https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Warning-Options.html#index- > Wvla-larger-than_003d > >

[Bug middle-end/109395] -Wvla-larger-than has no effect when compiling without optimizations

2023-04-03 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395 --- Comment #4 from Jakub Łukasiewicz --- (In reply to Andrew Pinski from comment #3) > (In reply to Jakub Łukasiewicz from comment #2) > > Passing `-ftree-vrp` doesn't activate it either > > Because of another part of the documentation: >

[Bug c/109395] New: -Wvla-larger-than has no effect when compiling without optimizations

2023-04-03 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395 Bug ID: 109395 Summary: -Wvla-larger-than has no effect when compiling without optimizations Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal

[Bug middle-end/109395] -Wvla-larger-than has no effect when compiling without optimizations

2023-04-03 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395 --- Comment #6 from Jakub Łukasiewicz --- (In reply to Andrew Pinski from comment #5) > (In reply to Jakub Łukasiewicz from comment #4) > > So there is not way of detecting automatic VLA in "debug release"? > > -Wvla works. > >

[Bug c/84510] C front-end does not utilise -Wuseless-cast

2023-05-30 Thread dev at joren dot ga via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84510 --- Comment #1 from Jakub Łukasiewicz --- It would be really helpful in preventing explicit void* casting; especially in case with malloc().