Patchwork Trivial patch to fix build with --enable-build-with-cxx

login
register
mail settings
Submitter Dmitry Gorbachev
Date May 2, 2011, 12:52 p.m.
Message ID <BANLkTi=Oyj8gF-R-aqMynn_1g0Qpvi3F-A@mail.gmail.com>
Download mbox | patch
Permalink /patch/93640/
State New
Headers show

Comments

Dmitry Gorbachev - May 2, 2011, 12:52 p.m.
../../gcc-4.7/gcc/tree-inline.c: In function 'tree_node*
maybe_inline_call_in_expr(tree)':
../../gcc-4.7/gcc/tree-inline.c:5229:40: error: converting 'false' to
pointer type 'void (*)(tree)' [-Werror=conversion-null]

2011-05-02  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>

	* tree-inline.c (maybe_inline_call_in_expr): Replace false by NULL.
Diego Novillo - May 2, 2011, 12:55 p.m.
On Mon, May 2, 2011 at 08:52, Dmitry Gorbachev <d.g.gorbachev@gmail.com> wrote:
> ../../gcc-4.7/gcc/tree-inline.c: In function 'tree_node*
> maybe_inline_call_in_expr(tree)':
> ../../gcc-4.7/gcc/tree-inline.c:5229:40: error: converting 'false' to
> pointer type 'void (*)(tree)' [-Werror=conversion-null]
>
> 2011-05-02  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
>
>        * tree-inline.c (maybe_inline_call_in_expr): Replace false by NULL.

OK.


Diego.
Eric Botcazou - May 2, 2011, 1:56 p.m.
> 2011-05-02  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>
>
> 	* tree-inline.c (maybe_inline_call_in_expr): Replace false by NULL.

Thanks for spotting this.  I'd apply it to all relevant branches (4.5/4.6).

Patch

--- gcc/tree-inline.c
+++ gcc/tree-inline.c
@@ -5226,7 +5226,7 @@ 
       id.transform_call_graph_edges = CB_CGE_DUPLICATE;
       id.transform_new_cfg = false;
       id.transform_return_to_modify = true;
-      id.transform_lang_insert_block = false;
+      id.transform_lang_insert_block = NULL;

       /* Make sure not to unshare trees behind the front-end's back
 	 since front-end specific mechanisms may rely on sharing.  */