PR c++/35007
* class.c (build_base_path): Fix !want_pointer case.
From-SVN: r131931
+2008-01-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/35007
+ * class.c (build_base_path): Fix !want_pointer case.
+
2008-01-27 Jason Merrill <jason@redhat.com>
PR c++/27177
/* Don't bother with the calculations inside sizeof; they'll ICE if the
source type is incomplete and the pointer value doesn't matter. */
if (skip_evaluation)
- return build_nop (build_pointer_type (target_type), expr);
+ {
+ expr = build_nop (build_pointer_type (target_type), expr);
+ if (!want_pointer)
+ expr = build_indirect_ref (expr, NULL);
+ return expr;
+ }
/* Do we need to check for a null pointer? */
if (want_pointer && !nonnull)
--- /dev/null
+// PR c++/35007
+
+struct AffEntry
+{
+ union {
+ char base[256];
+ } conds;
+};
+
+struct PfxEntry
+: public AffEntry
+{
+ PfxEntry()
+ {
+ sizeof(conds.base[0]);
+ }
+};