https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67882
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Author: msebor Date: Tue Nov 3 18:53:19 2015 New Revision: 229717 URL: https://gcc.gnu.org/viewcvs?rev=229717&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/c-c++-common/builtin-offsetof-2.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c-family/c-common.h trunk/gcc/testsuite/ChangeLog