diff options
author | Martin Uecker <uecker@tugraz.at> | 2023-07-27 13:36:05 +0200 |
---|---|---|
committer | Martin Uecker <uecker@tugraz.at> | 2023-11-01 22:35:14 +0100 |
commit | d880e093d92084f55b10626610ef059fd9194a6a (patch) | |
tree | 7d70dae90a63ba18a24e8f89ebeed7e1af246baf /gcc/rust/resolve | |
parent | 25f92179dea3080788c83743823c1decd84fee23 (diff) | |
download | gcc-d880e093d92084f55b10626610ef059fd9194a6a.zip gcc-d880e093d92084f55b10626610ef059fd9194a6a.tar.gz gcc-d880e093d92084f55b10626610ef059fd9194a6a.tar.bz2 |
c: Add Walloc-size to warn about insufficient size in allocations [PR71219]
Add option Walloc-size that warns about allocations that have
insufficient storage for the target type of the pointer the
storage is assigned to. Added to Wextra.
PR c/71219
gcc:
* doc/invoke.texi: Document -Walloc-size option.
gcc/c-family:
* c.opt (Walloc-size): New option.
gcc/c:
* c-typeck.cc (convert_for_assignment): Add warning.
gcc/testsuite:
* gcc.dg/Walloc-size-1.c: New test.
* gcc.dg/Walloc-size-2.c: New test.
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions