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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148336
138bc75d-0d04-0410-961f-
82ee72b054a4
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
parameter to unsigned int.
(default_builtin_vectorized_conversion): Change code parameter to
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]
= { [0 ... OTI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1].insn_code
= CODE_FOR_nothing };
rtx libfunc_table[LTI_MAX];
/* 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]
= { [0 ... COI_MAX - 1].handlers[0 ... NUM_MACHINE_MODES - 1]
[0 ... NUM_MACHINE_MODES - 1].insn_code
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. */
if (reinit)
init_insn_codes ();
/* 1 if we have C99 designated initializers. */
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \
- ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+ (((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L)) \
+ && !defined(__cplusplus))
#endif
#if HAVE_SYS_STAT_H