]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/c-common.c
PR c++-common/67882
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Nov 2015 18:53:19 +0000 (18:53 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Nov 2015 18:53:19 +0000 (18:53 +0000)
commitaeaccb7530380aec7f83b46c1f35ca5048d03f59
tree401facc539421f9aa5dc9e0dcaff8a9691d3412e
parentac7487f547090f41e325da0981d0d45e77e2282d
PR c++-common/67882

* c-family/c-common.h (fold_offsetof_1): Add argument.
* c-family/c-common.c (fold_offsetof_1): Diagnose more invalid
offsetof expressions that reference elements past the end of
an array.

        * c-c++-common/builtin-offsetof-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229717 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/builtin-offsetof-2.c [new file with mode: 0644]