Commit bf406687 by Ian Lance Taylor Committed by Ian Lance Taylor

system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if compiling with C++.

	* system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if
	compiling with C++.
	* optabs.c (optab_table): Only use designated initializers if
	HAVE_DESIGNATED_INITIALIZERS is defined.
	(convert_optab_table): Likewise.
	(init_optabs): Always call init_insn_codes if
	HAVE_DESIGNATED_INITIALIZERS is not defined.

From-SVN: r148336
parent 780ca5bf
2009-06-09 Ian Lance Taylor <iant@google.com> 2009-06-09 Ian Lance Taylor <iant@google.com>
* system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if
compiling with C++.
* optabs.c (optab_table): Only use designated initializers if
HAVE_DESIGNATED_INITIALIZERS is defined.
(convert_optab_table): Likewise.
(init_optabs): Always call init_insn_codes if
HAVE_DESIGNATED_INITIALIZERS is not defined.
2009-06-09 Ian Lance Taylor <iant@google.com>
* targhooks.c (default_builtin_vectorized_function): Change fn * targhooks.c (default_builtin_vectorized_function): Change fn
parameter to unsigned int. parameter to unsigned int.
(default_builtin_vectorized_conversion): Change code parameter to (default_builtin_vectorized_conversion): Change code parameter to
......
...@@ -54,7 +54,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -54,7 +54,7 @@ along with GCC; see the file COPYING3. If not see
See expr.h for documentation of these optabs. */ See expr.h for documentation of these optabs. */
#if GCC_VERSION >= 4000 #if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
__extension__ struct optab_d optab_table[OTI_MAX] __extension__ struct optab_d optab_table[OTI_MAX]
= { [0 ... OTI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1].insn_code = { [0 ... OTI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1].insn_code
= CODE_FOR_nothing }; = CODE_FOR_nothing };
...@@ -66,7 +66,7 @@ struct optab_d optab_table[OTI_MAX]; ...@@ -66,7 +66,7 @@ struct optab_d optab_table[OTI_MAX];
rtx libfunc_table[LTI_MAX]; rtx libfunc_table[LTI_MAX];
/* Tables of patterns for converting one mode to another. */ /* Tables of patterns for converting one mode to another. */
#if GCC_VERSION >= 4000 #if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
__extension__ struct convert_optab_d convert_optab_table[COI_MAX] __extension__ struct convert_optab_d convert_optab_table[COI_MAX]
= { [0 ... COI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1] = { [0 ... COI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1]
[0 ... NUM_MACHINE_MODES - 1].insn_code [0 ... NUM_MACHINE_MODES - 1].insn_code
...@@ -6153,7 +6153,7 @@ init_optabs (void) ...@@ -6153,7 +6153,7 @@ init_optabs (void)
vcondu_gen_code[i] = CODE_FOR_nothing; vcondu_gen_code[i] = CODE_FOR_nothing;
} }
#if GCC_VERSION >= 4000 #if GCC_VERSION >= 4000 && HAVE_DESIGNATED_INITIALIZERS
/* We statically initialize the insn_codes with CODE_FOR_nothing. */ /* We statically initialize the insn_codes with CODE_FOR_nothing. */
if (reinit) if (reinit)
init_insn_codes (); init_insn_codes ();
......
...@@ -452,7 +452,8 @@ extern int vsnprintf(char *, size_t, const char *, va_list); ...@@ -452,7 +452,8 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
/* 1 if we have C99 designated initializers. */ /* 1 if we have C99 designated initializers. */
#if !defined(HAVE_DESIGNATED_INITIALIZERS) #if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \ #define HAVE_DESIGNATED_INITIALIZERS \
((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L)) (((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L)) \
&& !defined(__cplusplus))
#endif #endif
#if HAVE_SYS_STAT_H #if HAVE_SYS_STAT_H
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment