* parser.c (cp_parser_postfix_expression): Allow "." to appear in
an offsetof expression.
PR c++/13529
* g++.dg/parse/offsetof3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75410
138bc75d-0d04-0410-961f-
82ee72b054a4
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
--- /dev/null
+// PR c++/13529
+
+#include <cstddef>
+
+struct A { int i; };
+struct B { A a; };
+
+int main()
+{
+ return offsetof(B,a.i) != 0;
+}