This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug objc++/53441] [4.8 Regression] obj-c++.dg/ivar-invalid-type-1.mm ICE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53441

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-21 20:43:40 UTC ---
Following patch fixes the ICE:

--cut here--
Index: cp/decl.c
===================================================================
--- cp/decl.c   (revision 187736)
+++ cp/decl.c   (working copy)
@@ -9803,7 +9803,8 @@ grokdeclarator (const cp_declarator *declarator,
               clones.  */
            DECL_ABSTRACT (decl) = 1;
        }
-      else if (constructor_name_p (unqualified_id, current_class_type))
+      else if (current_class_type
+              && constructor_name_p (unqualified_id, current_class_type))
        permerror (input_location, "ISO C++ forbids nested type %qD with same
name "
                   "as enclosing class",
                   unqualified_id);
--cut here--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]