1*c87b03e5Sespie/* This file contains the definitions and documentation for the 2*c87b03e5Sespie additional tree codes used in the GNU C++ compiler (see tree.def 3*c87b03e5Sespie for the standard codes). 4*c87b03e5Sespie Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998, 5*c87b03e5Sespie 1999, 2000, 2001 Free Software Foundation, Inc. 6*c87b03e5Sespie Written by Benjamin Chelf <chelf@codesourcery.com> 7*c87b03e5Sespie 8*c87b03e5SespieThis file is part of GCC. 9*c87b03e5Sespie 10*c87b03e5SespieGCC is free software; you can redistribute it and/or modify it under 11*c87b03e5Sespiethe terms of the GNU General Public License as published by the Free 12*c87b03e5SespieSoftware Foundation; either version 2, or (at your option) any later 13*c87b03e5Sespieversion. 14*c87b03e5Sespie 15*c87b03e5SespieGCC is distributed in the hope that it will be useful, but WITHOUT ANY 16*c87b03e5SespieWARRANTY; without even the implied warranty of MERCHANTABILITY or 17*c87b03e5SespieFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 18*c87b03e5Sespiefor more details. 19*c87b03e5Sespie 20*c87b03e5SespieYou should have received a copy of the GNU General Public License 21*c87b03e5Sespiealong with GCC; see the file COPYING. If not, write to the Free 22*c87b03e5SespieSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA 23*c87b03e5Sespie02111-1307, USA. */ 24*c87b03e5Sespie 25*c87b03e5Sespie/* Tree nodes relevant to both C and C++. These were originally in 26*c87b03e5Sespiecp-tree.def in the cp subdir. */ 27*c87b03e5Sespie 28*c87b03e5Sespie/* A node to remember a source position. */ 29*c87b03e5SespieDEFTREECODE (SRCLOC, "srcloc", 'x', 2) 30*c87b03e5Sespie 31*c87b03e5SespieDEFTREECODE (SIZEOF_EXPR, "sizeof_expr", '1', 1) 32*c87b03e5SespieDEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1) 33*c87b03e5SespieDEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1) 34*c87b03e5Sespie 35*c87b03e5Sespie/* Used to represent an expression statement. Use `EXPR_STMT_EXPR' to 36*c87b03e5Sespie obtain the expression. */ 37*c87b03e5SespieDEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1) 38*c87b03e5Sespie 39*c87b03e5Sespie/* Used to represent a brace-enclosed block. The operand is 40*c87b03e5Sespie COMPOUND_BODY. */ 41*c87b03e5SespieDEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1) 42*c87b03e5Sespie 43*c87b03e5Sespie/* Used to represent a local declaration. The operand is 44*c87b03e5Sespie DECL_STMT_DECL. */ 45*c87b03e5SespieDEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1) 46*c87b03e5Sespie 47*c87b03e5Sespie/* Represents an 'if' statement. The operands are IF_COND, 48*c87b03e5Sespie THEN_CLAUSE, and ELSE_CLAUSE, respectively. */ 49*c87b03e5SespieDEFTREECODE (IF_STMT, "if_stmt", 'e', 3) 50*c87b03e5Sespie 51*c87b03e5Sespie/* Used to represent a `for' statement. The operands are 52*c87b03e5Sespie FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */ 53*c87b03e5SespieDEFTREECODE (FOR_STMT, "for_stmt", 'e', 4) 54*c87b03e5Sespie 55*c87b03e5Sespie/* Used to represent a 'while' statement. The operands are WHILE_COND 56*c87b03e5Sespie and WHILE_BODY, respectively. */ 57*c87b03e5SespieDEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2) 58*c87b03e5Sespie 59*c87b03e5Sespie/* Used to represent a 'do' statement. The operands are DO_BODY and 60*c87b03e5Sespie DO_COND, respectively. */ 61*c87b03e5SespieDEFTREECODE (DO_STMT, "do_stmt", 'e', 2) 62*c87b03e5Sespie 63*c87b03e5Sespie/* Used to represent a 'return' statement. The operand is 64*c87b03e5Sespie RETURN_STMT_EXPR. */ 65*c87b03e5SespieDEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1) 66*c87b03e5Sespie 67*c87b03e5Sespie/* Used to represent a 'break' statement. */ 68*c87b03e5SespieDEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0) 69*c87b03e5Sespie 70*c87b03e5Sespie/* Used to represent a 'continue' statement. */ 71*c87b03e5SespieDEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0) 72*c87b03e5Sespie 73*c87b03e5Sespie/* Used to represent a 'switch' statement. The operands are 74*c87b03e5Sespie SWITCH_COND, SWITCH_BODY and SWITCH_TYPE, respectively. */ 75*c87b03e5SespieDEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 3) 76*c87b03e5Sespie 77*c87b03e5Sespie/* Used to represent a 'goto' statement. The operand is GOTO_DESTINATION. */ 78*c87b03e5SespieDEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1) 79*c87b03e5Sespie 80*c87b03e5Sespie/* Used to represent a 'label' statement. The operand is a LABEL_DECL 81*c87b03e5Sespie and can be obtained through the macro LABEL_STMT_LABEL. */ 82*c87b03e5SespieDEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1) 83*c87b03e5Sespie 84*c87b03e5Sespie/* Used to represent an inline assembly statement. */ 85*c87b03e5SespieDEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5) 86*c87b03e5Sespie 87*c87b03e5Sespie/* A SCOPE_STMT marks the beginning or end of a scope. If 88*c87b03e5Sespie SCOPE_BEGIN_P holds, then this is the start of a scope. If 89*c87b03e5Sespie SCOPE_END_P holds, then this is the end of a scope. If 90*c87b03e5Sespie SCOPE_NULLIFIED_P holds then there turned out to be no variables in 91*c87b03e5Sespie this scope. The SCOPE_STMT_BLOCK is the BLOCK containing the 92*c87b03e5Sespie variables declared in this scope. */ 93*c87b03e5SespieDEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1) 94*c87b03e5Sespie 95*c87b03e5Sespie/* A FILE_STMT marks the spot where a function changes files. It has no 96*c87b03e5Sespie other semantics. FILE_STMT_FILENAME gives the name. */ 97*c87b03e5SespieDEFTREECODE (FILE_STMT, "file_stmt", 'e', 1) 98*c87b03e5Sespie 99*c87b03e5Sespie/* Used to represent a CASE_LABEL. The operands are CASE_LOW and 100*c87b03e5Sespie CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a 101*c87b03e5Sespie 'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case 102*c87b03e5Sespie label. The CASE_LABEL_DECL is a LABEL_DECL for this node. */ 103*c87b03e5SespieDEFTREECODE (CASE_LABEL, "case_label", 'e', 3) 104*c87b03e5Sespie 105*c87b03e5Sespie/* A STMT_EXPR represents a statement-expression. The 106*c87b03e5Sespie STMT_EXPR_STMT is the statement given by the expression. */ 107*c87b03e5SespieDEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1) 108*c87b03e5Sespie 109*c87b03e5Sespie/* A COMPOUND_LITERAL_EXPR represents a C99 compound literal. The 110*c87b03e5Sespie COMPOUND_LITERAL_EXPR_DECL_STMT is the a DECL_STMT containing the decl 111*c87b03e5Sespie for the anonymous object represented by the COMPOUND_LITERAL; 112*c87b03e5Sespie the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes 113*c87b03e5Sespie the compound literal. */ 114*c87b03e5SespieDEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", 'e', 1) 115*c87b03e5Sespie 116*c87b03e5Sespie/* A CLEANUP_STMT marks the point at which a declaration is fully 117*c87b03e5Sespie constructed. If, after this point, the CLEANUP_DECL goes out of 118*c87b03e5Sespie scope, the CLEANUP_EXPR must be run. */ 119*c87b03e5SespieDEFTREECODE (CLEANUP_STMT, "cleanup_stmt", 'e', 2) 120*c87b03e5Sespie 121*c87b03e5Sespie/* 122*c87b03e5SespieLocal variables: 123*c87b03e5Sespiemode:c 124*c87b03e5SespieEnd: 125*c87b03e5Sespie*/ 126