OSDN Git Service

PR c/32041
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Jan 2009 19:44:33 +0000 (19:44 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Jan 2009 19:44:33 +0000 (19:44 +0000)
commitf0d0d842dc4b87389dd6b06471047500ef3b19a4
tree7eb464794074dac1ac24e5ca0d2dc38255415b91
parent3b8ed06d5854d2b948e1d74d1f2915e7c6cbdf33
PR c/32041
* c-parser.c (c_parser_postfix_expression): Allow `->' in
offsetof member-designator, handle it as `[0].'.

* parser.c (cp_parser_builtin_offsetof): Allow `->' in
offsetof member-designator, handle it as `[0].'.

* gcc.dg/pr32041.c: New test.
* g++.dg/parse/offsetof9.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143305 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/offsetof9.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr32041.c [new file with mode: 0644]