Thanks. -- Apparently it doesn't like ";" after labels and branches, and wants a newline. So try this:
--- p/utils/mk-t-inc.orig Sun Apr 20 15:38:25 2008 +++ p/utils/mk-t-inc Sun Apr 20 15:41:16 2008 @@ -72,6 +72,11 @@ cat "$GCCDIR/tree.def" echo 'DEFTREECODE (LAST_AND_UNUSED_C_TREE_CODE, "unused", '"'x', 0)" sed -e '/#ifdef EGCS/,${/#ifdef EGCS/d;/#else/,/#endif/d;}' "$GCCDIR/p/p-tree.def" -} | sed -ne ':loop;/\$/{N;bloop;};/^DEFTREECODE/{s,/*.**/,,;s/["'"'"']x["'"'"'].*/'"'x', 0)/;p;}" +} | sed -ne ':loop
/\\$/{
N
bloop
}
/^DEFTREECODE/{s,/\*.*\*/,,;s/["'"'"']x["'"'"'].*/'"'x'"', 0)/;p;}'
} > "$2" || { rm -f "$2"; false; }
This fixes the problem, thanks.
That's what I thought -- but there still is a problem. The tree.inc created with the patched p/utils/mk-t-inc and the Darwin system-sed doesn't have any #ifdef GCC_xx conditions and this results in duplicate symbols:
"/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/mk-t-inc" "/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc" "tree.inc" ../.././xgpc -B../.././ -L../.. -I../rts --automake --executable-file-name -W -Wall -Wmissing-prototypes -Wmissing-declarations -g --executable-path=. --unit-path=/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/rts --unit-path=/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/units -I. -I "/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p" "/Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas" /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas: In procedure `ProcessFile': /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas:45: error: redeclaration of `In_expr' /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas:45: error: previous declaration /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas:45: error: redeclaration of `Operator_decl' /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/gpidump.pas:45: error: previous declaration
Here is the diff for tree.inc
--- tree-ok.inc 2008-04-21 08:13:44.000000000 +0200 +++ tree-bad.inc 2008-04-21 07:55:53.000000000 +0200 @@ -1,4 +1,4 @@ -{ Generated automatically by /Users/adriaan/gnu/gpc/gpc346u2/gcc-3.4.6/gcc/p/utils/mk-t-inc for GCC version 3.4.6. } +{ Generated automatically by /Users/adriaan/gnu/gpc/gpc346u3/gcc-3.4.6/gcc/p/utils/mk-t-inc for GCC version 3.4.6. } { DO NOT CHANGE THIS FILE MANUALLY! }
{$ifndef GCC_VERSION_SET} @@ -265,7 +265,6 @@ DEFTREECODE (SWITCH_EXPR, "switch_expr", 'e', 2) DEFTREECODE (EXC_PTR_EXPR, "exc_ptr_expr", 'e', 0) DEFTREECODE (LAST_AND_UNUSED_C_TREE_CODE, "unused", 'x', 0) -#ifdef GCC_4_0 DEFTREECODE (OPERATOR_DECL, "operator_decl", tcc_declaration, 0) DEFTREECODE (INTERFACE_NAME_NODE, "interface_name_node", tcc_exceptional, 3) DEFTREECODE (IMPORT_NODE, "import_node", tcc_exceptional, 4) @@ -277,10 +276,7 @@ DEFTREECODE (RANGE_CHECK_EXPR, "range_check_expr", tcc_expression, 3) DEFTREECODE (IO_RANGE_CHECK_EXPR, "io_range_check_expr", tcc_expression, 3) DEFTREECODE (IN_EXPR, "in_expr", tcc_binary, 2) -#ifdef GCC_4_1 DEFTREECODE (PASCAL_SET_CONSTRUCTOR, "pascal_set_constructor", tcc_expression, 1) -#endif -#else DEFTREECODE (OPERATOR_DECL, "operator_decl", 'd', 0) DEFTREECODE (INTERFACE_NAME_NODE, "interface_name_node", 'x', 0) DEFTREECODE (IMPORT_NODE, "import_node", 'x', 0) @@ -291,4 +287,3 @@ DEFTREECODE (SYMDIFF_EXPR, "symdiff_expr", '2', 2) DEFTREECODE (RANGE_CHECK_EXPR, "range_check_expr", 'e', 3) DEFTREECODE (IO_RANGE_CHECK_EXPR, "io_range_check_expr", 'e', 3) -#endif
Regards,
Adriaan van Os