https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>:

https://gcc.gnu.org/g:d880e093d92084f55b10626610ef059fd9194a6a

commit r14-5059-gd880e093d92084f55b10626610ef059fd9194a6a
Author: Martin Uecker <uec...@tugraz.at>
Date:   Thu Jul 27 13:36:05 2023 +0200

    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.

Reply via email to