]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/35007 (Firefox fails to build with affentry.cpp:94: error: ISO C++ forbids...
authorJason Merrill <jason@redhat.com>
Tue, 29 Jan 2008 05:52:20 +0000 (00:52 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 29 Jan 2008 05:52:20 +0000 (00:52 -0500)
        PR c++/35007
        * class.c (build_base_path): Fix !want_pointer case.

From-SVN: r131933

gcc/cp/ChangeLog
gcc/cp/class.c

index 0dd212a6edff49e9094cb14713159c209018675e..5c8c2a60d1762eb17114e9aded3fc6e03220434c 100644 (file)
@@ -1,3 +1,8 @@
+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
index 9d7dd8800fd07c0b1e203ca9e458d3c5dc434554..6cb040dbea596f1c0e1de305302a1440b5f33908 100644 (file)
@@ -297,7 +297,12 @@ build_base_path (enum tree_code code,
   /* 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)