Patchwork [C++11,4.9] Add missing REDUC_PLUS_EXPR case to potential_constant_expression_1.

login
register
mail settings
Submitter Andreas Schwab
Date April 23, 2013, 9:05 a.m.
Message ID <m2haixmxas.fsf@igel.home>
Download mbox | patch
Permalink /patch/238809/
State New
Headers show

Comments

Andreas Schwab - April 23, 2013, 9:05 a.m.
James Greenhalgh <james.greenhalgh@arm.com> writes:

> diff --git a/gcc/coretypes.h b/gcc/coretypes.h
> index 320b4dd..76fc4aa 100644
> --- a/gcc/coretypes.h
> +++ b/gcc/coretypes.h
> @@ -62,6 +62,8 @@ union gimple_statement_d;
>  typedef union gimple_statement_d *gimple;
>  typedef const union gimple_statement_d *const_gimple;
>  typedef gimple gimple_seq;
> +struct gimple_stmt_iterator_d;
> +typedef gimple_stmt_iterator_d gimple_stmt_iterator;

../../xgcc -B../../ -c -DIN_GCC  -DUSE_LIBUNWIND_EXCEPTIONS -O2 -g -W -Wall  \
                -iquote /usr/local/gcc/gcc-20130423/gcc \
                 -iquote . -iquote .. -iquote ../.. -iquote /usr/local/gcc/gcc-20130423/gcc/ada -iquote /usr/local/gcc/gcc-20130423/gcc -I/usr/local/gcc/gcc-20130423/gcc/../include -I/usr/local/gcc/gcc-20130423/Build/./gmp -I/usr/local/gcc/gcc-20130423/gmp -I/usr/local/gcc/gcc-20130423/Build/./mpfr -I/usr/local/gcc/gcc-20130423/mpfr -I/usr/local/gcc/gcc-20130423/mpc/src  \
                ../rts/targext.c -o targext.o
In file included from ../rts/targext.c:45:0:
/usr/local/gcc/gcc-20130423/gcc/coretypes.h:66:1: error: unknown type name 'gimple_stmt_iterator_d'
 typedef gimple_stmt_iterator_d gimple_stmt_iterator;
 ^
make[3]: *** [targext.o] Error 1
make[3]: Leaving directory `/usr/local/gcc/gcc-20130423/Build/gcc/ada/tools'
make[2]: *** [gnattools-native] Error 2

Tested on x86_64-suse-linux and committed as obvious.

Andreas.

	* coretypes.h (gimple_stmt_iterator): Add struct to make
	compatible with C.

Patch

Index: coretypes.h
===================================================================
--- coretypes.h	(revision 198175)
+++ coretypes.h	(working copy)
@@ -63,7 +63,7 @@  typedef union gimple_statement_d *gimple
 typedef const union gimple_statement_d *const_gimple;
 typedef gimple gimple_seq;
 struct gimple_stmt_iterator_d;
-typedef gimple_stmt_iterator_d gimple_stmt_iterator;
+typedef struct gimple_stmt_iterator_d gimple_stmt_iterator;
 union section;
 typedef union section section;
 struct gcc_options;