c-common.def revision 90075
190075Sobrien/* This file contains the definitions and documentation for the
290075Sobrien   additional tree codes used in the GNU C++ compiler (see tree.def
390075Sobrien   for the standard codes).
490075Sobrien   Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998,
590075Sobrien   1999, 2000, 2001 Free Software Foundation, Inc.
690075Sobrien   Written by Benjamin Chelf <chelf@codesourcery.com>
790075Sobrien
890075SobrienThis file is part of GCC.
990075Sobrien
1090075SobrienGCC is free software; you can redistribute it and/or modify it under
1190075Sobrienthe terms of the GNU General Public License as published by the Free
1290075SobrienSoftware Foundation; either version 2, or (at your option) any later
1390075Sobrienversion.
1490075Sobrien
1590075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1690075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or
1790075SobrienFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1890075Sobrienfor more details.
1990075Sobrien
2090075SobrienYou should have received a copy of the GNU General Public License
2190075Sobrienalong with GCC; see the file COPYING.  If not, write to the Free
2290075SobrienSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA
2390075Sobrien02111-1307, USA.  */
2490075Sobrien
2590075Sobrien/* Tree nodes relevant to both C and C++. These were originally in
2690075Sobriencp-tree.def in the cp subdir. */
2790075Sobrien
2890075Sobrien/* A node to remember a source position.  */
2990075SobrienDEFTREECODE (SRCLOC, "srcloc", 'x', 2)
3090075Sobrien
3190075SobrienDEFTREECODE (SIZEOF_EXPR, "sizeof_expr", '1', 1)
3290075SobrienDEFTREECODE (ARROW_EXPR, "arrow_expr", 'e', 1)
3390075SobrienDEFTREECODE (ALIGNOF_EXPR, "alignof_expr", '1', 1)
3490075Sobrien
3590075Sobrien/* Used to represent an expression statement.  Use `EXPR_STMT_EXPR' to
3690075Sobrien   obtain the expression. */
3790075SobrienDEFTREECODE (EXPR_STMT, "expr_stmt", 'e', 1)
3890075Sobrien
3990075Sobrien/* Used to represent a brace-enclosed block.  The operand is
4090075Sobrien   COMPOUND_BODY. */ 
4190075SobrienDEFTREECODE (COMPOUND_STMT, "compound_stmt", 'e', 1)
4290075Sobrien
4390075Sobrien/* Used to represent a local declaration. The operand is
4490075Sobrien   DECL_STMT_DECL. */
4590075SobrienDEFTREECODE (DECL_STMT, "decl_stmt", 'e', 1)
4690075Sobrien
4790075Sobrien/* Represents an 'if' statement. The operands are IF_COND,
4890075Sobrien   THEN_CLAUSE, and ELSE_CLAUSE, respectively. */
4990075SobrienDEFTREECODE (IF_STMT, "if_stmt", 'e', 3)
5090075Sobrien
5190075Sobrien/* Used to represent a `for' statement. The operands are
5290075Sobrien   FOR_INIT_STMT, FOR_COND, FOR_EXPR, and FOR_BODY, respectively. */
5390075SobrienDEFTREECODE (FOR_STMT, "for_stmt", 'e', 4)
5490075Sobrien
5590075Sobrien/* Used to represent a 'while' statement. The operands are WHILE_COND
5690075Sobrien   and WHILE_BODY, respectively. */
5790075SobrienDEFTREECODE (WHILE_STMT, "while_stmt", 'e', 2)
5890075Sobrien
5990075Sobrien/* Used to represent a 'do' statement. The operands are DO_BODY and
6090075Sobrien   DO_COND, respectively. */
6190075SobrienDEFTREECODE (DO_STMT, "do_stmt", 'e', 2)
6290075Sobrien
6390075Sobrien/* Used to represent a 'return' statement. The operand is
6490075Sobrien   RETURN_EXPR. */
6590075SobrienDEFTREECODE (RETURN_STMT, "return_stmt", 'e', 1)
6690075Sobrien
6790075Sobrien/* Used to represent a 'break' statement. */
6890075SobrienDEFTREECODE (BREAK_STMT, "break_stmt", 'e', 0)
6990075Sobrien
7090075Sobrien/* Used to represent a 'continue' statement. */
7190075SobrienDEFTREECODE (CONTINUE_STMT, "continue_stmt", 'e', 0)
7290075Sobrien
7390075Sobrien/* Used to represent a 'switch' statement. The operands are
7490075Sobrien   SWITCH_COND and SWITCH_BODY, respectively. */
7590075SobrienDEFTREECODE (SWITCH_STMT, "switch_stmt", 'e', 2)
7690075Sobrien
7790075Sobrien/* Used to represent a 'goto' statement. The operand is GOTO_DESTINATION. */
7890075SobrienDEFTREECODE (GOTO_STMT, "goto_stmt", 'e', 1)
7990075Sobrien
8090075Sobrien/* Used to represent a 'label' statement. The operand is a LABEL_DECL
8190075Sobrien   and can be obtained through the macro LABEL_STMT_LABEL. */
8290075SobrienDEFTREECODE (LABEL_STMT, "label_stmt", 'e', 1)
8390075Sobrien
8490075Sobrien/* Used to represent an inline assembly statement. */
8590075SobrienDEFTREECODE (ASM_STMT, "asm_stmt", 'e', 5)
8690075Sobrien
8790075Sobrien/* A SCOPE_STMT marks the beginning or end of a scope.  If
8890075Sobrien   SCOPE_BEGIN_P holds, then this is the start of a scope.  If
8990075Sobrien   SCOPE_END_P holds, then this is the end of a scope.  If
9090075Sobrien   SCOPE_NULLIFIED_P holds then there turned out to be no variables in
9190075Sobrien   this scope.  The SCOPE_STMT_BLOCK is the BLOCK containing the
9290075Sobrien   variables declared in this scope.  */
9390075SobrienDEFTREECODE (SCOPE_STMT, "scope_stmt", 'e', 1)
9490075Sobrien
9590075Sobrien/* A FILE_STMT marks the spot where a function changes files.  It has no
9690075Sobrien   other semantics.  FILE_STMT_FILENAME gives the name.  */
9790075SobrienDEFTREECODE (FILE_STMT, "file_stmt", 'e', 1)
9890075Sobrien
9990075Sobrien/* Used to represent a CASE_LABEL. The operands are CASE_LOW and
10090075Sobrien   CASE_HIGH, respectively. If CASE_LOW is NULL_TREE, the label is a
10190075Sobrien   'default' label. If CASE_HIGH is NULL_TREE, the label is a normal case
10290075Sobrien   label.  The CASE_LABEL_DECL is a LABEL_DECL for this node.  */
10390075SobrienDEFTREECODE (CASE_LABEL, "case_label", 'e', 3)
10490075Sobrien
10590075Sobrien/* A STMT_EXPR represents a statement-expression.  The
10690075Sobrien   STMT_EXPR_STMT is the statement given by the expression.  */
10790075SobrienDEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1)
10890075Sobrien
10990075Sobrien/* A COMPOUND_LITERAL_EXPR represents a C99 compound literal.  The
11090075Sobrien   COMPOUND_LITERAL_EXPR_DECL_STMT is the a DECL_STMT containing the decl
11190075Sobrien   for the anonymous object represented by the COMPOUND_LITERAL;
11290075Sobrien   the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes
11390075Sobrien   the compound literal.  */
11490075SobrienDEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", 'e', 1)
11590075Sobrien
11690075Sobrien/*
11790075SobrienLocal variables:
11890075Sobrienmode:c
11990075SobrienEnd:
12090075Sobrien*/
121