OSDN Git Service

Fix PR c++/38699
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Nov 2009 10:44:36 +0000 (10:44 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Nov 2009 10:44:36 +0000 (10:44 +0000)
commit64ed018c41cc01c9e1be29e767d2764ea1a01f69
treec87dd211761661c2a4d2e74640e5d6de9bb6613b
parent19a64efc18e179f32cde45ad62aaef3d12c72e2e
Fix PR c++/38699

gcc/ChangeLog:

PR c++/38699
* c-common.c (fold_offsetof_1): Issue errors when the
member designator of the offsetoff expression is not legitimate.

gcc/testsuite/ChangeLog:

* c-c++-common/dfp/builtin-offsetof.c: New test.
* g++.dg/other/offsetof6.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153843 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/dfp/builtin-offsetof.c [new file with mode: 0644]
gcc/testsuite/g++.dg/other/offsetof6.C [new file with mode: 0644]