re PR c++/13529 (offsetof() with member-designator containing member access broken)

PR c++/13529
	* parser.c (cp_parser_postfix_expression): Allow "." to appear in
	an offsetof expression.

	PR c++/13529
	* g++.dg/parse/offsetof3.C: New test.

From-SVN: r75410
This commit is contained in:
Mark Mitchell 2004-01-05 01:52:57 +00:00 committed by Mark Mitchell
parent 643aee72b3
commit 955d023464
3 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2004-01-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13529
* parser.c (cp_parser_postfix_expression): Allow "." to appear in
an offsetof expression.
* parser.c (cp_parser_parameter_declaration): Fix comment.
PR c++/12226

View File

@ -1,5 +1,8 @@
2004-01-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13529
* g++.dg/parse/offsetof3.C: New test.
* g++.dg/init/copy7.C: Add missing dg-error markers.
PR c++/12226

View File

@ -0,0 +1,11 @@
// PR c++/13529
#include <cstddef>
struct A { int i; };
struct B { A a; };
int main()
{
return offsetof(B,a.i) != 0;
}