OSDN Git Service

PR objc++/36723
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Jul 2008 05:11:18 +0000 (05:11 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Jul 2008 05:11:18 +0000 (05:11 +0000)
        * objc/objc-act.c (objc_build_constructor): Update C++ tweak.
        * cp/lex.c (init_reswords): Always set D_OBJC.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137813 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/lex.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c

index ac33477..62d2335 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-14  Jason Merrill  <jason@redhat.com>
+
+       * lex.c (init_reswords): Always set D_OBJC.
+
 2008-07-11  Tom Tromey  <tromey@redhat.com>
            Ian Lance Taylor  <iant@google.com>
 
index 890640e..ee2f2a8 100644 (file)
@@ -179,8 +179,9 @@ init_reswords (void)
     mask |= D_ASM | D_EXT;
   if (flag_no_gnu_keywords)
     mask |= D_EXT;
-  if (!c_dialect_objc())
-    mask |= D_OBJC;
+
+  /* The Objective-C keywords are all context-dependent.  */
+  mask |= D_OBJC;
 
   ridpointers = GGC_CNEWVEC (tree, (int) RID_MAX);
   for (i = 0; i < num_c_common_reswords; i++)
index 6ebf4b1..15ba12c 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-14  Jason Merrill  <jason@redhat.com>
+
+       PR objc++/36723
+       * objc-act.c (objc_build_constructor): Update C++ tweak.
+
 2007-07-14  Rafael Avila de Espindola  <espindola@google.com>
 
        * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
index 6d338a0..8cbf81a 100644 (file)
@@ -2028,8 +2028,7 @@ objc_build_constructor (tree type, tree elts)
   /* Adjust for impedance mismatch.  We should figure out how to build
      CONSTRUCTORs that consistently please both the C and C++ gods.  */
   if (!TREE_PURPOSE (elts))
-    TREE_TYPE (constructor) = NULL_TREE;
-  TREE_HAS_CONSTRUCTOR (constructor) = 1;
+    TREE_TYPE (constructor) = init_list_type_node;
 #endif
 
   return constructor;