aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Stott <grahams@redhat.com>2002-01-03 05:22:51 +0000
committerGraham Stott <grahams@gcc.gnu.org>2002-01-03 05:22:51 +0000
commitfb2bf631890dd81b9c5a9579d0a954aaab9ee4ec (patch)
tree1439891a388da71d9d3697962f15432fbd3e35a0
parentb9daac31920bd6c26751068a1c40164f49d48224 (diff)
downloadgcc-fb2bf631890dd81b9c5a9579d0a954aaab9ee4ec.zip
gcc-fb2bf631890dd81b9c5a9579d0a954aaab9ee4ec.tar.gz
gcc-fb2bf631890dd81b9c5a9579d0a954aaab9ee4ec.tar.bz2
mkconfig.sh: Output to config.h...
* mkconfig.sh: Output to config.h, hconfig.h and tconfig.h forward defs for struct tags rtx_def, union_tree, rtvec_def also output corresponding typedefs for rtxm, tree, and rtvcec. * system.h: Move forward defs for struct tags rtx_def, union_tree, rtvec_def along with corresponding typedefs for rtx, tree, and rtvcec to config.h, hconfig.h, tconfig.h From-SVN: r48499
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/mkconfig.sh21
-rw-r--r--gcc/system.h12
3 files changed, 32 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5d0eafb..a230405 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,14 @@
-2000-01-03 Graham Stott <grahams@redhat.com>
+2002-01-03 Graham Stott <grahams@redhat.com>
+
+ * mkconfig.sh: Output to config.h, hconfig.h and tconfig.h
+ forward defs for struct tags rtx_def, union_tree, rtvec_def
+ also output corresponding typedefs for rtxm, tree, and rtvcec.
+
+ * system.h: Move forward defs for struct tags rtx_def, union_tree,
+ rtvec_def along with corresponding typedefs for rtx, tree, and
+ rtvcec to config.h, hconfig.h, tconfig.h
+
+2002-01-03 Graham Stott <grahams@redhat.com>
* tree.h: Update copyright date.
(IS_EXPR_CODE_CLASS): Add parenthesis.
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
index fde254a..b63e40a 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -35,6 +35,27 @@ if [ -n "$HEADERS" ]; then
esac
fi
+# Provide three core typedefs used by everything, if we are compiling
+# GCC. These used to be found in rtl.h and tree.h, but this is no
+# longer practical. Providing these in config.h/tconfig.h/hconfig.h
+# rather than system.h allows the typedefs to be used anywhere in GCC.
+case $output in
+ *config.h | *hconfig.h | *tconfig.h)
+ echo "#ifdef IN_GCC"
+ echo "/* Provide three core typedefs used by everything, if we are compiling"
+ echo " GCC. These used to be found in rtl.h and tree.h, but this is no"
+ echo " longer practical. Providing these here rather that system.h allows"
+ echo " the typedefs to be used everywhere within GCC. */"
+ echo "struct rtx_def;"
+ echo "typedef struct rtx_def *rtx;"
+ echo "struct rtvec_def;"
+ echo "typedef struct rtvec_def *rtvec;"
+ echo "union tree_node;"
+ echo "typedef union tree_node *tree;"
+ echo "#endif"
+ ;;
+esac
+
if [ -n "$HEADERS" ]; then
echo '#ifdef IN_GCC'
for file in $HEADERS; do
diff --git a/gcc/system.h b/gcc/system.h
index a527384..ccccae7 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -557,18 +557,6 @@ typedef char _Bool;
#define TRUE true
#define FALSE false
-/* Provide three core typedefs used by everything, if we are compiling
- GCC. These used to be found in rtl.h and tree.h, but this is no
- longer practical. */
-#ifdef IN_GCC
-struct rtx_def;
-struct rtvec_def;
-union tree_node;
-typedef struct rtx_def *rtx;
-typedef struct rtvec_def *rtvec;
-typedef union tree_node *tree;
-#endif
-
/* As the last action in this file, we poison the identifiers that
shouldn't be used. Note, luckily gcc-3.0's token-based integrated
preprocessor won't trip on poisoned identifiers that arrive from