aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-10 02:01:06 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-06-10 02:01:06 +0000
commitbf4066870d1a42226e711c1e941f14733f648f6d (patch)
treedb7cab5db121bc9f4ea32f384356de3085b43d24 /gcc/system.h
parent780ca5bf715142256f55d6bda4a282c9a3529d33 (diff)
downloadgcc-bf4066870d1a42226e711c1e941f14733f648f6d.zip
gcc-bf4066870d1a42226e711c1e941f14733f648f6d.tar.gz
gcc-bf4066870d1a42226e711c1e941f14733f648f6d.tar.bz2
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
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 2a111ee..51d9c99 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -452,7 +452,8 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
/* 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