diff mbox

Fix obvious typo that breaks boot strap in delayed folding

Message ID 20151115200649.GQ3533@two.firstfloor.org
State New
Headers show

Commit Message

Andi Kleen Nov. 15, 2015, 8:06 p.m. UTC
The recent merge of the delayed folding branch breaks boot strap with

../../gcc/gcc/cp/tree.c: In function 'tree_node* build_cplus_array_type(tree, tree)':
../../gcc/gcc/cp/tree.c:894:44: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
        = TYPE_NEEDS_CONSTRUCTING (elt_type));
                                            ^

../../gcc/gcc/cp/tree.c:896:51: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
        = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (elt_type));


Fix the obivous typos. To to commit?

-Andi

Comments

Andreas Schwab Nov. 15, 2015, 10:09 p.m. UTC | #1
Andi Kleen <andi@firstfloor.org> writes:

> Fix the obivous typos. To to commit?

They are not typos.

Andreas.
Andi Kleen Nov. 15, 2015, 11:13 p.m. UTC | #2
On Sun, Nov 15, 2015 at 11:09:18PM +0100, Andreas Schwab wrote:
> Andi Kleen <andi@firstfloor.org> writes:
> 
> > Fix the obivous typos. To to commit?
> 
> They are not typos.

Ok. What do you suggest to fix the error then?

-Andi
Andreas Schwab Nov. 16, 2015, 8:07 a.m. UTC | #3
Andi Kleen <andi@firstfloor.org> writes:

> On Sun, Nov 15, 2015 at 11:09:18PM +0100, Andreas Schwab wrote:
>> Andi Kleen <andi@firstfloor.org> writes:
>> 
>> > Fix the obivous typos. To to commit?
>> 
>> They are not typos.
>
> Ok. What do you suggest to fix the error then?

Someone will need to fix the regression introduced by the C++ delayed
folding.

Andreas.
diff mbox

Patch

diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d2db31a..83643df 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -891,9 +891,9 @@  build_cplus_array_type (tree elt_type, tree index_type)
   /* Push these needs up to the ARRAY_TYPE so that initialization takes
      place more easily.  */
   bool needs_ctor = (TYPE_NEEDS_CONSTRUCTING (t)
-		     = TYPE_NEEDS_CONSTRUCTING (elt_type));
+		     == TYPE_NEEDS_CONSTRUCTING (elt_type));
   bool needs_dtor = (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
-		     = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (elt_type));
+		     == TYPE_HAS_NONTRIVIAL_DESTRUCTOR (elt_type));
 
   if (!dependent && t == TYPE_MAIN_VARIANT (t)
       && !COMPLETE_TYPE_P (t) && COMPLETE_TYPE_P (elt_type))