From: Jason Merrill Date: Tue, 15 Jul 2008 05:11:18 +0000 (-0400) Subject: re PR objc++/36723 (massive obj-c++ failures at rev.137407) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ce841d2c832b46c5b72518715c41ba91cde344f;p=gcc.git re PR objc++/36723 (massive obj-c++ failures at rev.137407) PR objc++/36723 * objc/objc-act.c (objc_build_constructor): Update C++ tweak. * cp/lex.c (init_reswords): Always set D_OBJC. From-SVN: r137813 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ac33477482d..62d2335dde1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2008-07-14 Jason Merrill + + * lex.c (init_reswords): Always set D_OBJC. + 2008-07-11 Tom Tromey Ian Lance Taylor diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 890640e912a..ee2f2a80706 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -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++) diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 6ebf4b14348..15ba12c999a 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-14 Jason Merrill + + PR objc++/36723 + * objc-act.c (objc_build_constructor): Update C++ tweak. + 2007-07-14 Rafael Avila de Espindola * objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 6d338a04ec6..8cbf81a0313 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -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;