Commit 955d0234 by Mark Mitchell Committed by Mark Mitchell

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
parent 643aee72
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
......
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
......
// PR c++/13529
#include <cstddef>
struct A { int i; };
struct B { A a; };
int main()
{
return offsetof(B,a.i) != 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment