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:
parent
643aee72b3
commit
955d023464
3 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
11
gcc/testsuite/g++.dg/parse/offsetof3.C
Normal file
11
gcc/testsuite/g++.dg/parse/offsetof3.C
Normal 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;
|
||||
}
|
Loading…
Add table
Reference in a new issue