OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [cp/] [operators.def] - Diff between revs 816 and 826

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 816 Rev 826
/* -*-C-*-
/* -*-C-*-
   This file contains definitions of the various C++ operators,
   This file contains definitions of the various C++ operators,
   including both overloadable operators (like `+') and
   including both overloadable operators (like `+') and
   non-overloadable operators (like the `?:' ternary operator).
   non-overloadable operators (like the `?:' ternary operator).
   Written by Mark Mitchell 
   Written by Mark Mitchell 
   Copyright (C) 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009
   Copyright (C) 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
This file is part of GCC.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
the Free Software Foundation; either version 3, or (at your option)
any later version.
any later version.
GCC is distributed in the hope that it will be useful,
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
.  */
.  */
/* The DEF_OPERATOR macro takes the following arguments:
/* The DEF_OPERATOR macro takes the following arguments:
   NAME
   NAME
     The name of the operator, as a C string, but without the
     The name of the operator, as a C string, but without the
     preceding `operator'.  This is the name that would be given in
     preceding `operator'.  This is the name that would be given in
     the source program.  For `operator +', for example, this would be
     the source program.  For `operator +', for example, this would be
     `+'.
     `+'.
   CODE
   CODE
     The tree_code for this operator.  For `operator +', for example,
     The tree_code for this operator.  For `operator +', for example,
     this would be PLUS_EXPR.  Because there are no tree codes for
     this would be PLUS_EXPR.  Because there are no tree codes for
     assignment operators, the same tree-codes are reused; i.e.,
     assignment operators, the same tree-codes are reused; i.e.,
     `operator +' will also have PLUS_EXPR as its CODE.
     `operator +' will also have PLUS_EXPR as its CODE.
   MANGLING
   MANGLING
     The mangling prefix for the operator, as a C string, and as
     The mangling prefix for the operator, as a C string, and as
     mangled under the new ABI.  For `operator +', for example, this
     mangled under the new ABI.  For `operator +', for example, this
     would be "pl".
     would be "pl".
   ARITY
   ARITY
     The arity of the operator, or -1 if any arity is allowed.  (As
     The arity of the operator, or -1 if any arity is allowed.  (As
     for `operator ()'.)  Postincrement and postdecrement operators
     for `operator ()'.)  Postincrement and postdecrement operators
     are marked as binary.
     are marked as binary.
   ASSN_P
   ASSN_P
     A boolean value.  If nonzero, this is an assignment operator.
     A boolean value.  If nonzero, this is an assignment operator.
   Before including this file, you should define DEF_OPERATOR
   Before including this file, you should define DEF_OPERATOR
   to take these arguments.
   to take these arguments.
   There is code (such as in grok_op_properties) that depends on the
   There is code (such as in grok_op_properties) that depends on the
   order the operators are presented in this file.  In particular,
   order the operators are presented in this file.  In particular,
   unary operators must precede binary operators.  */
   unary operators must precede binary operators.  */
/* Use DEF_SIMPLE_OPERATOR to define a non-assignment operator.  Its
/* Use DEF_SIMPLE_OPERATOR to define a non-assignment operator.  Its
   arguments are as for DEF_OPERATOR, but there is no need to provide
   arguments are as for DEF_OPERATOR, but there is no need to provide
   an ASSIGNMENT_P argument; it is always zero.  */
   an ASSIGNMENT_P argument; it is always zero.  */
#define DEF_SIMPLE_OPERATOR(NAME, CODE, MANGLING, ARITY) \
#define DEF_SIMPLE_OPERATOR(NAME, CODE, MANGLING, ARITY) \
  DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, 0)
  DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, 0)
/* Use DEF_ASSN_OPERATOR to define an assignment operator.  Its
/* Use DEF_ASSN_OPERATOR to define an assignment operator.  Its
   arguments are as for DEF_OPERATOR, but there is no need to provide
   arguments are as for DEF_OPERATOR, but there is no need to provide
   an ASSIGNMENT_P argument; it is always one.  */
   an ASSIGNMENT_P argument; it is always one.  */
#define DEF_ASSN_OPERATOR(NAME, CODE, MANGLING, ARITY) \
#define DEF_ASSN_OPERATOR(NAME, CODE, MANGLING, ARITY) \
  DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, 1)
  DEF_OPERATOR(NAME, CODE, MANGLING, ARITY, 1)
/* Memory allocation operators.  */
/* Memory allocation operators.  */
DEF_SIMPLE_OPERATOR ("new", NEW_EXPR, "nw", -1)
DEF_SIMPLE_OPERATOR ("new", NEW_EXPR, "nw", -1)
DEF_SIMPLE_OPERATOR ("new []", VEC_NEW_EXPR, "na", -1)
DEF_SIMPLE_OPERATOR ("new []", VEC_NEW_EXPR, "na", -1)
DEF_SIMPLE_OPERATOR ("delete", DELETE_EXPR, "dl", -1)
DEF_SIMPLE_OPERATOR ("delete", DELETE_EXPR, "dl", -1)
DEF_SIMPLE_OPERATOR ("delete []", VEC_DELETE_EXPR, "da", -1)
DEF_SIMPLE_OPERATOR ("delete []", VEC_DELETE_EXPR, "da", -1)
/* Unary operators.  */
/* Unary operators.  */
DEF_SIMPLE_OPERATOR ("+", UNARY_PLUS_EXPR, "ps", 1)
DEF_SIMPLE_OPERATOR ("+", UNARY_PLUS_EXPR, "ps", 1)
DEF_SIMPLE_OPERATOR ("-", NEGATE_EXPR, "ng", 1)
DEF_SIMPLE_OPERATOR ("-", NEGATE_EXPR, "ng", 1)
DEF_SIMPLE_OPERATOR ("&", ADDR_EXPR, "ad", 1)
DEF_SIMPLE_OPERATOR ("&", ADDR_EXPR, "ad", 1)
DEF_SIMPLE_OPERATOR ("*", INDIRECT_REF, "de", 1)
DEF_SIMPLE_OPERATOR ("*", INDIRECT_REF, "de", 1)
DEF_SIMPLE_OPERATOR ("~", BIT_NOT_EXPR, "co", 1)
DEF_SIMPLE_OPERATOR ("~", BIT_NOT_EXPR, "co", 1)
DEF_SIMPLE_OPERATOR ("!", TRUTH_NOT_EXPR, "nt", 1)
DEF_SIMPLE_OPERATOR ("!", TRUTH_NOT_EXPR, "nt", 1)
DEF_SIMPLE_OPERATOR ("++", PREINCREMENT_EXPR, "pp", 1)
DEF_SIMPLE_OPERATOR ("++", PREINCREMENT_EXPR, "pp", 1)
DEF_SIMPLE_OPERATOR ("--", PREDECREMENT_EXPR, "mm", 1)
DEF_SIMPLE_OPERATOR ("--", PREDECREMENT_EXPR, "mm", 1)
DEF_SIMPLE_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", 1)
DEF_SIMPLE_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", 1)
/* These are extensions.  */
/* These are extensions.  */
DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "az", 1)
DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "az", 1)
DEF_SIMPLE_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", 1)
DEF_SIMPLE_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", 1)
DEF_SIMPLE_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", 1)
DEF_SIMPLE_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", 1)
/* The cast operator.  */
/* The cast operator.  */
DEF_SIMPLE_OPERATOR ("", TYPE_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", TYPE_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", CAST_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", CAST_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", CONST_CAST_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", CONST_CAST_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", STATIC_CAST_EXPR, "cv", 1)
DEF_SIMPLE_OPERATOR ("", STATIC_CAST_EXPR, "cv", 1)
/* Binary operators.  */
/* Binary operators.  */
DEF_SIMPLE_OPERATOR ("+", PLUS_EXPR, "pl", 2)
DEF_SIMPLE_OPERATOR ("+", PLUS_EXPR, "pl", 2)
DEF_SIMPLE_OPERATOR ("-", MINUS_EXPR, "mi", 2)
DEF_SIMPLE_OPERATOR ("-", MINUS_EXPR, "mi", 2)
DEF_SIMPLE_OPERATOR ("*", MULT_EXPR, "ml", 2)
DEF_SIMPLE_OPERATOR ("*", MULT_EXPR, "ml", 2)
DEF_SIMPLE_OPERATOR ("/", TRUNC_DIV_EXPR, "dv", 2)
DEF_SIMPLE_OPERATOR ("/", TRUNC_DIV_EXPR, "dv", 2)
DEF_SIMPLE_OPERATOR ("%", TRUNC_MOD_EXPR, "rm", 2)
DEF_SIMPLE_OPERATOR ("%", TRUNC_MOD_EXPR, "rm", 2)
DEF_SIMPLE_OPERATOR ("&", BIT_AND_EXPR, "an", 2)
DEF_SIMPLE_OPERATOR ("&", BIT_AND_EXPR, "an", 2)
DEF_SIMPLE_OPERATOR ("|", BIT_IOR_EXPR, "or", 2)
DEF_SIMPLE_OPERATOR ("|", BIT_IOR_EXPR, "or", 2)
DEF_SIMPLE_OPERATOR ("^", BIT_XOR_EXPR, "eo", 2)
DEF_SIMPLE_OPERATOR ("^", BIT_XOR_EXPR, "eo", 2)
DEF_SIMPLE_OPERATOR ("<<", LSHIFT_EXPR, "ls", 2)
DEF_SIMPLE_OPERATOR ("<<", LSHIFT_EXPR, "ls", 2)
DEF_SIMPLE_OPERATOR (">>", RSHIFT_EXPR, "rs", 2)
DEF_SIMPLE_OPERATOR (">>", RSHIFT_EXPR, "rs", 2)
DEF_SIMPLE_OPERATOR ("==", EQ_EXPR, "eq", 2)
DEF_SIMPLE_OPERATOR ("==", EQ_EXPR, "eq", 2)
DEF_SIMPLE_OPERATOR ("!=", NE_EXPR, "ne", 2)
DEF_SIMPLE_OPERATOR ("!=", NE_EXPR, "ne", 2)
DEF_SIMPLE_OPERATOR ("<", LT_EXPR, "lt", 2)
DEF_SIMPLE_OPERATOR ("<", LT_EXPR, "lt", 2)
DEF_SIMPLE_OPERATOR (">", GT_EXPR, "gt", 2)
DEF_SIMPLE_OPERATOR (">", GT_EXPR, "gt", 2)
DEF_SIMPLE_OPERATOR ("<=", LE_EXPR, "le", 2)
DEF_SIMPLE_OPERATOR ("<=", LE_EXPR, "le", 2)
DEF_SIMPLE_OPERATOR (">=", GE_EXPR, "ge", 2)
DEF_SIMPLE_OPERATOR (">=", GE_EXPR, "ge", 2)
DEF_SIMPLE_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", 2)
DEF_SIMPLE_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", 2)
DEF_SIMPLE_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", 2)
DEF_SIMPLE_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", 2)
DEF_SIMPLE_OPERATOR (",", COMPOUND_EXPR, "cm", 2)
DEF_SIMPLE_OPERATOR (",", COMPOUND_EXPR, "cm", 2)
DEF_SIMPLE_OPERATOR ("->*", MEMBER_REF, "pm", 2)
DEF_SIMPLE_OPERATOR ("->*", MEMBER_REF, "pm", 2)
DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2)
DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2)
DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2)
DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2)
DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2)
DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2)
DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2)
DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2)
/* This one is needed for mangling.  */
/* This one is needed for mangling.  */
DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2)
DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2)
/* Assignment operators.  */
/* Assignment operators.  */
DEF_ASSN_OPERATOR ("=", NOP_EXPR, "aS", 2)
DEF_ASSN_OPERATOR ("=", NOP_EXPR, "aS", 2)
DEF_ASSN_OPERATOR ("+=", PLUS_EXPR, "pL", 2)
DEF_ASSN_OPERATOR ("+=", PLUS_EXPR, "pL", 2)
DEF_ASSN_OPERATOR ("-=", MINUS_EXPR, "mI", 2)
DEF_ASSN_OPERATOR ("-=", MINUS_EXPR, "mI", 2)
DEF_ASSN_OPERATOR ("*=", MULT_EXPR, "mL", 2)
DEF_ASSN_OPERATOR ("*=", MULT_EXPR, "mL", 2)
DEF_ASSN_OPERATOR ("/=", TRUNC_DIV_EXPR, "dV", 2)
DEF_ASSN_OPERATOR ("/=", TRUNC_DIV_EXPR, "dV", 2)
DEF_ASSN_OPERATOR ("%=", TRUNC_MOD_EXPR, "rM", 2)
DEF_ASSN_OPERATOR ("%=", TRUNC_MOD_EXPR, "rM", 2)
DEF_ASSN_OPERATOR ("&=", BIT_AND_EXPR, "aN", 2)
DEF_ASSN_OPERATOR ("&=", BIT_AND_EXPR, "aN", 2)
DEF_ASSN_OPERATOR ("|=", BIT_IOR_EXPR, "oR", 2)
DEF_ASSN_OPERATOR ("|=", BIT_IOR_EXPR, "oR", 2)
DEF_ASSN_OPERATOR ("^=", BIT_XOR_EXPR, "eO", 2)
DEF_ASSN_OPERATOR ("^=", BIT_XOR_EXPR, "eO", 2)
DEF_ASSN_OPERATOR ("<<=", LSHIFT_EXPR, "lS", 2)
DEF_ASSN_OPERATOR ("<<=", LSHIFT_EXPR, "lS", 2)
DEF_ASSN_OPERATOR (">>=", RSHIFT_EXPR, "rS", 2)
DEF_ASSN_OPERATOR (">>=", RSHIFT_EXPR, "rS", 2)
/* Ternary operators.  */
/* Ternary operators.  */
DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
/* Miscellaneous.  */
/* Miscellaneous.  */
DEF_SIMPLE_OPERATOR ("()", CALL_EXPR, "cl", -1)
DEF_SIMPLE_OPERATOR ("()", CALL_EXPR, "cl", -1)
/* Variadic templates extension. */
/* Variadic templates extension. */
DEF_SIMPLE_OPERATOR ("...", EXPR_PACK_EXPANSION, "sp", 1)
DEF_SIMPLE_OPERATOR ("...", EXPR_PACK_EXPANSION, "sp", 1)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.