PR c++/89331 - ICE with offsetof in incomplete class.
We were aborting when build_base_path returned an error because of the derived class not being complete yet, which wasn't considered by the assert. Fixed by checking for complete type first. The semantics.c change avoids a duplicate error message. * semantics.c (finish_offsetof): Handle error_mark_node. * typeck.c (build_class_member_access_expr): Call complete_type_or_maybe_complain before converting to base. From-SVN: r270135
Showing
gcc/testsuite/g++.dg/ext/builtin-offsetof4.C
0 → 100644
Please
register
or
sign in
to comment