]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR tree-optimization/88372 - alloc_size attribute is ignored on function pointers
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Dec 2018 22:45:55 +0000 (22:45 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Dec 2018 22:45:55 +0000 (22:45 +0000)
commit0f15b7f669e823b8f48ffc6fd3253ad065ff331f
tree257c476ecc81a6f345864f453f153057cf7f98de
parent2ecb854bf2a95378871dcd2a39a10ca7cc529d45
PR tree-optimization/88372 - alloc_size attribute is ignored on function pointers

gcc/ChangeLog:

PR tree-optimization/88372
* calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
* tree-object-size.c (alloc_object_size): Same.  Simplify.
* doc/extend.texi (Object Size Checking): Update.
(Other Builtins): Add __builtin_object_size.
(Common Type Attributes): Add alloc_size.
(Common Variable Attributes): Ditto.

gcc/testsuite/ChangeLog:

PR tree-optimization/88372
* gcc.dg/Walloc-size-larger-than-18.c: New test.
* gcc.dg/builtin-object-size-19.c: Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267158 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/calls.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/builtin-object-size-19.c [new file with mode: 0644]
gcc/tree-object-size.c