diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c5d10d870780dc467debecc1a6f987c748502bf0..aac96ee5af44f3769e7a0a0a2d0afdb8a4593a0a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1a5f9a3839611a746b91abf60c64a460003b77c6..258604725b10c2f7b519172d011c8f3970e6c712 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/g++.dg/parse/offsetof3.C b/gcc/testsuite/g++.dg/parse/offsetof3.C new file mode 100644 index 0000000000000000000000000000000000000000..905e5f58a1f40fc343b4aa25d268826db5e233b0 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/offsetof3.C @@ -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; +}