Commit d7e7759d by Benjamin Chelf Committed by Ben Chelf

c-common.h (IF_COND): Moved here from cp/cp-tree.h.

	* c-common.h (IF_COND): Moved here from cp/cp-tree.h.
	(THEN_CLAUSE): Likewise.
	(ELSE_CLAUSE): Likewise.
	(WHILE_COND): Likewise.
	(WHILE_BODY): Likewise.
	(DO_COND): Likewise.
	(DO_BODY): Likewise.
	(RETURN_EXPR): Likewise.
	(EXPR_STMT_EXPR): Likewise.
	(FOR_INIT_STMT): Likewise.
	(FOR_COND): Likewise.
	(FOR_EXPR): Likewise.
	(FOR_BODY): Likewise.
	(SWITCH_COND): Likewise.
	(SWITCH_BODY): Likewise.
	(CASE_LOW): Likewise.
	(CASE_HIGH): Likewise.
	(GOTO_DESTINATION): Likewise.
	(COMPOUND_BODY): Likewise.
	(ASM_CV_QUAL): Likewise.
	(ASM_STRING): Likewise.
	(ASM_OUTPUTS): Likewise.
	(ASM_INPUTS): Likewise.
	(ASM_CLOBBERS): Likewise.
	(DECL_STMT_DECL): Likewise.
	(STMT_EXPR_STMT): Likewise.
	(LABEL_STMT_LABEL): Likewise.
	(SCOPE_BEGIN_P): Likewise.
	(SCOPE_END_P): Likewise.
	(SCOPE_STMT_BLOCK): Likewise.
	(SCOPE_NULLIFIED_P): Likewise.
	(SCOPE_NO_CLEANUPS_P): Likewise.
	(SCOPE_PARTIAL_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(STMT_LINENO): Likewise.
	(STMT_LINENO_FOR_FN_P): Likewise.

	* c-common.def: Added SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
	ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
	FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
	CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
	SCOPE_STMT, CASE_LABEL, STMT_EXPR.

	* gencheck.c (tree_codes[]): Added '#include "c-common.def"'.

	* cp/cp-tree.h (IF_COND): Move to c-common.h.
	(THEN_CLAUSE): Likewise.
	(ELSE_CLAUSE): Likewise.
	(WHILE_COND): Likewise.
	(WHILE_BODY): Likewise.
	(DO_COND): Likewise.
	(DO_BODY): Likewise.
	(RETURN_EXPR): Likewise.
	(EXPR_STMT_EXPR): Likewise.
	(FOR_INIT_STMT): Likewise.
	(FOR_COND): Likewise.
	(FOR_EXPR): Likewise.
	(FOR_BODY): Likewise.
	(SWITCH_COND): Likewise.
	(SWITCH_BODY): Likewise.
	(CASE_LOW): Likewise.
	(CASE_HIGH): Likewise.
	(GOTO_DESTINATION): Likewise.
	(COMPOUND_BODY): Likewise.
	(ASM_CV_QUAL): Likewise.
	(ASM_STRING): Likewise.
	(ASM_OUTPUTS): Likewise.
	(ASM_INPUTS): Likewise.
	(ASM_CLOBBERS): Likewise.
	(DECL_STMT_DECL): Likewise.
	(STMT_EXPR_STMT): Likewise.
	(LABEL_STMT_LABEL): Likewise.
	(SCOPE_BEGIN_P): Likewise.
	(SCOPE_END_P): Likewise.
	(SCOPE_STMT_BLOCK): Likewise.
	(SCOPE_NULLIFIED_P): Likewise.
	(SCOPE_NO_CLEANUPS_P): Likewise.
	(SCOPE_PARTIAL_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(STMT_LINENO): Likewise.
	(STMT_LINENO_FOR_FN_P): Likewise.

	* cp/cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
	ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
	FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
	CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
	SCOPE_STMT, CASE_LABEL, STMT_EXPR.

	* cp/Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.

	* cp/Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
	(cc1plus$(exeext)): Added $(srcdir)/c-common.def.

	* cp/lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
	(cplus_tree_code_length[]): Added '#include "c-common.def"'.
	(cplus_tree_code_name[]): Added '#include "c-common.def"'.

From-SVN: r34552
parent c809adda
2000-06-14 Benjamin Chelf <chelf@cabriolet.stanford.edu>
* c-common.h (IF_COND): Moved here from cp/cp-tree.h.
(THEN_CLAUSE): Likewise.
(ELSE_CLAUSE): Likewise.
(WHILE_COND): Likewise.
(WHILE_BODY): Likewise.
(DO_COND): Likewise.
(DO_BODY): Likewise.
(RETURN_EXPR): Likewise.
(EXPR_STMT_EXPR): Likewise.
(FOR_INIT_STMT): Likewise.
(FOR_COND): Likewise.
(FOR_EXPR): Likewise.
(FOR_BODY): Likewise.
(SWITCH_COND): Likewise.
(SWITCH_BODY): Likewise.
(CASE_LOW): Likewise.
(CASE_HIGH): Likewise.
(GOTO_DESTINATION): Likewise.
(COMPOUND_BODY): Likewise.
(ASM_CV_QUAL): Likewise.
(ASM_STRING): Likewise.
(ASM_OUTPUTS): Likewise.
(ASM_INPUTS): Likewise.
(ASM_CLOBBERS): Likewise.
(DECL_STMT_DECL): Likewise.
(STMT_EXPR_STMT): Likewise.
(LABEL_STMT_LABEL): Likewise.
(SCOPE_BEGIN_P): Likewise.
(SCOPE_END_P): Likewise.
(SCOPE_STMT_BLOCK): Likewise.
(SCOPE_NULLIFIED_P): Likewise.
(SCOPE_NO_CLEANUPS_P): Likewise.
(SCOPE_PARTIAL_P): Likewise.
(ASM_VOLATILE_P): Likewise.
(STMT_LINENO): Likewise.
(STMT_LINENO_FOR_FN_P): Likewise.
* c-common.def: Added SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
SCOPE_STMT, CASE_LABEL, STMT_EXPR.
* gencheck.c (tree_codes[]): Added '#include "c-common.def"'.
2000-06-14 David O'Brien <obrien@FreeBSD.org> 2000-06-14 David O'Brien <obrien@FreeBSD.org>
* gcc.c (main): Quiet compiler warnings. argv is assumed to be * gcc.c (main): Quiet compiler warnings. argv is assumed to be
......
/* This file contains the definitions and documentation for the
additional tree codes used in the GNU C++ compiler (see tree.def
for the standard codes).
Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998,
1999, 2000 Free Software Foundation, Inc.
Written by Benjamin Chelf <chelf@codesourcery.com>
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Tree nodes relevent to both C and C++. These were originally in
cp-tree.def in the cp subdir. */
/* A node to remember a source position. */
DEFTREECODE (SRCLOC, "srcloc", 'x', 2)
/* A whole bunch of tree codes for the initial, superficial parsing of
templates. */
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", '1', 1)
DEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1)
DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1)
DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1)
DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1)
DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1)
DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4)
DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0)
DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
/* A SCOPE_STMT marks the beginning or end of a scope. If
SCOPE_BEGIN_P holds, then this is the start of a scope. If
SCOPE_END_P holds, then this is the end of a scope. If
SCOPE_NULLIFIED_P holds then there turned out to be no variables in
this scope. The SCOPE_STMT_BLOCK is the BLOCK containing the
variables declared in this scope. */
DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
DEFTREECODE (CASE_LABEL, "case_label", 'e', 2)
/* A STMT_EXPR represents a statement-expression. The
STMT_EXPR_STMT is the statement given by the expression. */
DEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1)
...@@ -163,3 +163,86 @@ extern tree build_va_arg PARAMS ((tree, tree)); ...@@ -163,3 +163,86 @@ extern tree build_va_arg PARAMS ((tree, tree));
extern int self_promoting_args_p PARAMS ((tree)); extern int self_promoting_args_p PARAMS ((tree));
extern tree simple_type_promotes_to PARAMS ((tree)); extern tree simple_type_promotes_to PARAMS ((tree));
/* These macros provide convenient access to the various _STMT nodes
created when parsing template declarations. */
#define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0)
#define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1)
#define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2)
#define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
#define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
#define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0)
#define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1)
#define RETURN_EXPR(NODE) TREE_OPERAND (RETURN_STMT_CHECK (NODE), 0)
#define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0)
#define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
#define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
#define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
#define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
#define SWITCH_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
#define SWITCH_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
#define CASE_LOW(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 0)
#define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_CHECK (NODE), 1)
#define GOTO_DESTINATION(NODE) TREE_OPERAND (GOTO_STMT_CHECK (NODE), 0)
#define COMPOUND_BODY(NODE) TREE_OPERAND (COMPOUND_STMT_CHECK (NODE), 0)
#define ASM_CV_QUAL(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 0)
#define ASM_STRING(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 1)
#define ASM_OUTPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 2)
#define ASM_INPUTS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 3)
#define ASM_CLOBBERS(NODE) TREE_OPERAND (ASM_STMT_CHECK (NODE), 4)
#define DECL_STMT_DECL(NODE) TREE_OPERAND (DECL_STMT_CHECK (NODE), 0)
#define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0)
#define LABEL_STMT_LABEL(NODE) TREE_OPERAND (LABEL_STMT_CHECK (NODE), 0)
/* Nonzero if this SCOPE_STMT is for the beginning of a scope. */
#define SCOPE_BEGIN_P(NODE) \
(TREE_LANG_FLAG_0 (SCOPE_STMT_CHECK (NODE)))
/* Nonzero if this SCOPE_STMT is for the end of a scope. */
#define SCOPE_END_P(NODE) \
(!SCOPE_BEGIN_P (SCOPE_STMT_CHECK (NODE)))
/* The BLOCK containing the declarations contained in this scope. */
#define SCOPE_STMT_BLOCK(NODE) \
(TREE_OPERAND (SCOPE_STMT_CHECK (NODE), 0))
/* Nonzero for a SCOPE_STMT if there were no variables in this scope. */
#define SCOPE_NULLIFIED_P(NODE) \
(SCOPE_STMT_BLOCK ((NODE)) == NULL_TREE)
/* Nonzero for a SCOPE_STMT which represents a lexical scope, but
which should be treated as non-existant from the point of view of
running cleanup actions. */
#define SCOPE_NO_CLEANUPS_P(NODE) \
(TREE_LANG_FLAG_3 (SCOPE_STMT_CHECK (NODE)))
/* Nonzero for a SCOPE_STMT if this statement is for a partial scope.
For example, in:
S s;
l:
S s2;
goto l;
there is (implicitly) a new scope after `l', even though there are
no curly braces. In particular, when we hit the goto, we must
destroy s2 and then re-construct it. For the implicit scope,
SCOPE_PARTIAL_P will be set. */
#define SCOPE_PARTIAL_P(NODE) \
(TREE_LANG_FLAG_4 (SCOPE_STMT_CHECK (NODE)))
/* Nonzero for an ASM_STMT if the assembly statement is volatile. */
#define ASM_VOLATILE_P(NODE) \
(ASM_CV_QUAL (ASM_STMT_CHECK (NODE)) != NULL_TREE)
/* The line-number at which a statement began. But if
STMT_LINENO_FOR_FN_P does holds, then this macro gives the
line number for the end of the current function instead. */
#define STMT_LINENO(NODE) \
(TREE_COMPLEXITY ((NODE)))
/* If non-zero, the STMT_LINENO for NODE is the line at which the
function ended. */
#define STMT_LINENO_FOR_FN_P(NODE) \
(TREE_LANG_FLAG_2 ((NODE)))
2000-06-14 Benjamin Chelf <chelf@cabriolet.stanford.edu>
* cp-tree.h (IF_COND): Move to c-common.h.
(THEN_CLAUSE): Likewise.
(ELSE_CLAUSE): Likewise.
(WHILE_COND): Likewise.
(WHILE_BODY): Likewise.
(DO_COND): Likewise.
(DO_BODY): Likewise.
(RETURN_EXPR): Likewise.
(EXPR_STMT_EXPR): Likewise.
(FOR_INIT_STMT): Likewise.
(FOR_COND): Likewise.
(FOR_EXPR): Likewise.
(FOR_BODY): Likewise.
(SWITCH_COND): Likewise.
(SWITCH_BODY): Likewise.
(CASE_LOW): Likewise.
(CASE_HIGH): Likewise.
(GOTO_DESTINATION): Likewise.
(COMPOUND_BODY): Likewise.
(ASM_CV_QUAL): Likewise.
(ASM_STRING): Likewise.
(ASM_OUTPUTS): Likewise.
(ASM_INPUTS): Likewise.
(ASM_CLOBBERS): Likewise.
(DECL_STMT_DECL): Likewise.
(STMT_EXPR_STMT): Likewise.
(LABEL_STMT_LABEL): Likewise.
(SCOPE_BEGIN_P): Likewise.
(SCOPE_END_P): Likewise.
(SCOPE_STMT_BLOCK): Likewise.
(SCOPE_NULLIFIED_P): Likewise.
(SCOPE_NO_CLEANUPS_P): Likewise.
(SCOPE_PARTIAL_P): Likewise.
(ASM_VOLATILE_P): Likewise.
(STMT_LINENO): Likewise.
(STMT_LINENO_FOR_FN_P): Likewise.
* cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
SCOPE_STMT, CASE_LABEL, STMT_EXPR.
* Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
* Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
(cc1plus$(exeext)): Added $(srcdir)/c-common.def.
* lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
(cplus_tree_code_length[]): Added '#include "c-common.def"'.
(cplus_tree_code_name[]): Added '#include "c-common.def"'.
2000-06-14 Mark Mitchell <mark@codesourcery.com> 2000-06-14 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro. * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
......
...@@ -110,6 +110,7 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS) ...@@ -110,6 +110,7 @@ $(DEMANGLER_PROG): cxxmain.o underscore.o $(LIBDEPS)
cxxmain.o underscore.o $(LIBS) cxxmain.o underscore.o $(LIBS)
CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \ CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \
$(srcdir)/c-common.def \
$(srcdir)/cp/cp-tree.h $(srcdir)/cp/cvt.c $(srcdir)/cp/decl.c \ $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cvt.c $(srcdir)/cp/decl.c \
$(srcdir)/cp/decl.h $(srcdir)/cp/decl2.c $(srcdir)/cp/dump.c \ $(srcdir)/cp/decl.h $(srcdir)/cp/decl2.c $(srcdir)/cp/dump.c \
$(srcdir)/cp/errfn.c $(srcdir)/cp/error.c $(srcdir)/cp/except.c \ $(srcdir)/cp/errfn.c $(srcdir)/cp/error.c $(srcdir)/cp/except.c \
...@@ -123,7 +124,7 @@ CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \ ...@@ -123,7 +124,7 @@ CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/class.c $(srcdir)/cp/cp-tree.def \
cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o \ cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o \
c-pragma.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \ c-pragma.o $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def \
$(srcdir)/cp/gxx.gperf $(srcdir)/cp/cfns.gperf hash.o \ $(srcdir)/c-common.def $(srcdir)/cp/gxx.gperf $(srcdir)/cp/cfns.gperf hash.o \
$(srcdir)/cp/operators.def $(srcdir)/cp/operators.def
cd cp; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext) cd cp; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext)
# #
......
...@@ -203,7 +203,7 @@ RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \ ...@@ -203,7 +203,7 @@ RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \ TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
$(srcdir)/../machmode.h $(srcdir)/../machmode.def $(srcdir)/../machmode.h $(srcdir)/../machmode.def
CXX_TREE_H = $(TREE_H) cp-tree.h $(srcdir)/../c-common.h cp-tree.def \ CXX_TREE_H = $(TREE_H) cp-tree.h $(srcdir)/../c-common.h cp-tree.def \
$(srcdir)/../function.h $(srcdir)/../varray.h \ $(srcdir)/../c-common.def $(srcdir)/../function.h $(srcdir)/../varray.h \
$(srcdir)/../../include/splay-tree.h \ $(srcdir)/../../include/splay-tree.h \
$(srcdir)/../system.h $(CONFIG_H) $(srcdir)/../system.h $(CONFIG_H)
PARSE_H = $(srcdir)/parse.h PARSE_H = $(srcdir)/parse.h
......
...@@ -185,9 +185,6 @@ DEFTREECODE (OVERLOAD, "overload", 'x', 1) ...@@ -185,9 +185,6 @@ DEFTREECODE (OVERLOAD, "overload", 'x', 1)
tree structure. */ tree structure. */
DEFTREECODE (WRAPPER, "wrapper", 'x', 1) DEFTREECODE (WRAPPER, "wrapper", 'x', 1)
/* A node to remember a source position. */
DEFTREECODE (SRCLOC, "srcloc", 'x', 2)
/* Used to represent deferred name lookup for dependent names while /* Used to represent deferred name lookup for dependent names while
parsing a template declaration. The first argument is an parsing a template declaration. The first argument is an
IDENTIFIER_NODE for the name in question. The TREE_TYPE is IDENTIFIER_NODE for the name in question. The TREE_TYPE is
...@@ -205,27 +202,10 @@ DEFTREECODE (REINTERPRET_CAST_EXPR, "reinterpret_cast_expr", '1', 1) ...@@ -205,27 +202,10 @@ DEFTREECODE (REINTERPRET_CAST_EXPR, "reinterpret_cast_expr", '1', 1)
DEFTREECODE (CONST_CAST_EXPR, "const_cast_expr", '1', 1) DEFTREECODE (CONST_CAST_EXPR, "const_cast_expr", '1', 1)
DEFTREECODE (STATIC_CAST_EXPR, "static_cast_expr", '1', 1) DEFTREECODE (STATIC_CAST_EXPR, "static_cast_expr", '1', 1)
DEFTREECODE (DYNAMIC_CAST_EXPR, "dynamic_cast_expr", '1', 1) DEFTREECODE (DYNAMIC_CAST_EXPR, "dynamic_cast_expr", '1', 1)
DEFTREECODE (SIZEOF_EXPR, "sizeof_expr", '1', 1)
DEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1)
DEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1)
DEFTREECODE (DOTSTAR_EXPR, "dotstar_expr", 'e', 2) DEFTREECODE (DOTSTAR_EXPR, "dotstar_expr", 'e', 2)
DEFTREECODE (TYPEID_EXPR, "typeid_expr", 'e', 1) DEFTREECODE (TYPEID_EXPR, "typeid_expr", 'e', 1)
DEFTREECODE (PSEUDO_DTOR_EXPR, "pseudo_dtor_expr", 'e', 3) DEFTREECODE (PSEUDO_DTOR_EXPR, "pseudo_dtor_expr", 'e', 3)
DEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1)
DEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1)
DEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1)
DEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
DEFTREECODE (FOR_STMT, "for_stmt", 'e', 4)
DEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
DEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
DEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
DEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0)
DEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
DEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
DEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
DEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
DEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
/* A SUBOBJECT statement marks the point at which a sub-object is /* A SUBOBJECT statement marks the point at which a sub-object is
fully constructed. After this point, the SUBOBJECT_CLEANUP must be fully constructed. After this point, the SUBOBJECT_CLEANUP must be
run if an exception is thrown before the end of the enclosing run if an exception is thrown before the end of the enclosing
...@@ -244,23 +224,11 @@ DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 2) ...@@ -244,23 +224,11 @@ DEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 2)
the START_CATCH_TYPE. If this is CATCH_ALL_TYPE, then the handler the START_CATCH_TYPE. If this is CATCH_ALL_TYPE, then the handler
catches all types. */ catches all types. */
DEFTREECODE (START_CATCH_STMT, "start_catch_stmt", 'e', 0) DEFTREECODE (START_CATCH_STMT, "start_catch_stmt", 'e', 0)
/* A SCOPE_STMT marks the beginning or end of a scope. If
SCOPE_BEGIN_P holds, then this is the start of a scope. If
SCOPE_END_P holds, then this is the end of a scope. If
SCOPE_NULLIFIED_P holds then there turned out to be no variables in
this scope. The SCOPE_STMT_BLOCK is the BLOCK containing the
variables declared in this scope. */
DEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 2) DEFTREECODE (CTOR_INITIALIZER, "ctor_initializer", 'e', 2)
DEFTREECODE (CASE_LABEL, "case_label", 'e', 2)
DEFTREECODE (RETURN_INIT, "return_init", 'e', 2) DEFTREECODE (RETURN_INIT, "return_init", 'e', 2)
DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2) DEFTREECODE (TRY_BLOCK, "try_block", 'e', 2)
DEFTREECODE (HANDLER, "handler", 'e', 2) DEFTREECODE (HANDLER, "handler", 'e', 2)
/* A STMT_EXPR represents a statement-expression. The
STMT_EXPR_STMT is the statement given by the expression. */
DEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1)
DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0) DEFTREECODE (TAG_DEFN, "tag_defn", 'e', 0)
/* And some codes for expressing conversions for overload resolution. */ /* And some codes for expressing conversions for overload resolution. */
......
...@@ -349,6 +349,7 @@ get_time_identifier (name) ...@@ -349,6 +349,7 @@ get_time_identifier (name)
static char cplus_tree_code_type[] = { static char cplus_tree_code_type[] = {
'x', 'x',
#include "c-common.def"
#include "cp-tree.def" #include "cp-tree.def"
}; };
#undef DEFTREECODE #undef DEFTREECODE
...@@ -361,6 +362,7 @@ static char cplus_tree_code_type[] = { ...@@ -361,6 +362,7 @@ static char cplus_tree_code_type[] = {
static int cplus_tree_code_length[] = { static int cplus_tree_code_length[] = {
0, 0,
#include "c-common.def"
#include "cp-tree.def" #include "cp-tree.def"
}; };
#undef DEFTREECODE #undef DEFTREECODE
...@@ -371,6 +373,7 @@ static int cplus_tree_code_length[] = { ...@@ -371,6 +373,7 @@ static int cplus_tree_code_length[] = {
static const char *cplus_tree_code_name[] = { static const char *cplus_tree_code_name[] = {
"@@dummy", "@@dummy",
#include "c-common.def"
#include "cp-tree.def" #include "cp-tree.def"
}; };
#undef DEFTREECODE #undef DEFTREECODE
......
...@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
const char *tree_codes[] = { const char *tree_codes[] = {
#include "tree.def" #include "tree.def"
#include "c-common.def"
#include "gencheck.h" #include "gencheck.h"
(char*)0 (char*)0
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment