summaryrefslogtreecommitdiff
path: root/gcc/acconfig.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 21:56:21 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 21:56:21 +0000
commit8a5a972b0c091ca10fecb2b3b09eaa91e82d510b (patch)
treea43596b0de85765570d75dbad446df2dd4110a0f /gcc/acconfig.h
parentc8b793cf1932b4beeec61310dae8c0d793fd4fd8 (diff)
downloadgcc-8a5a972b0c091ca10fecb2b3b09eaa91e82d510b.tar.gz
* acconfig.h: Define `const' to the empty string if neither
__STDC__ nor __cplusplus is defined. * config.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39272 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/acconfig.h')
-rw-r--r--gcc/acconfig.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index 3e8c595e484..dec619b84b0 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -25,3 +25,17 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef ssize_t
+
+@BOTTOM@
+
+/* Bison unconditionally undefines `const' if neither `__STDC__' nor
+ __cplusplus are defined. That's a problem since we use `const' in
+ the GCC headers, and the resulting bison code is therefore type
+ unsafe. Thus, we must match the bison behavior here. */
+
+#ifndef __STDC__
+#ifndef __cplusplus
+#undef const
+#define const
+#endif
+#endif