OSDN Git Service

* cp-tree.h (current_tempalte_parms): Improve documentation.
[pf3gnuchains/gcc-fork.git] / gcc / cp / operators.def
index 775f59d..b8400cd 100644 (file)
@@ -1,28 +1,28 @@
 /* -*-C-*-
-       
+
    This file contains definitions of the various C++ operators,
    including both overloadable operators (like `+') and
-   non-overloadable operators (like the `?:' ternary operator).  
-   Writtey by Mark Mitchell <mark@codesourcery.com>
+   non-overloadable operators (like the `?:' ternary operator).
+   Written by Mark Mitchell <mark@codesourcery.com>
 
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC 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
 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,
+GCC 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.  */
+along with GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /* The DEF_OPERATOR macro takes the following arguments:
 
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA.  */
      preceding `operator'.  This is the name that would be given in
      the source program.  For `operator +', for example, this would be
      `+'.
-   
+
    CODE
 
      The tree_code for this operator.  For `operator +', for example,
@@ -40,33 +40,29 @@ Boston, MA 02111-1307, USA.  */
      assignment operators, the same tree-codes are reused; i.e.,
      `operator +' will also have PLUS_EXPR as its CODE.
 
-   NEW_MANGLING
+   MANGLING
 
      The mangling prefix for the operator, as a C string, and as
      mangled under the new ABI.  For `operator +', for example, this
      would be "pl".
 
-   OLD_MANGLING
-
-     Analogous, but for the old ABI.
-
    ARITY
-   
+
      The arity of the operator, or -1 if any arity is allowed.  (As
      for `operator ()'.)  Postincrement and postdecrement operators
      are marked as binary.
 
    ASSN_P
 
-     A boolean value.  If non-zero, this is an assignment operator.  
+     A boolean value.  If nonzero, this is an assignment operator.
 
    Before including this file, you should define DEFOPERATOR
-   to take these arguments.  
+   to take these arguments.
 
    There is code (such as in grok_op_properties) that depends on the
    order the operators are presented in this file.  In particular,
    unary operators must precede binary operators.  */
+
 /* Use DEF_SIMPLE_OPERATOR to define a non-assignment operator.  Its
    arguments are as for DEF_OPERATOR, but there is no need to provide
    an ASSIGNMENT_P argument; it is always zero.  */
@@ -88,7 +84,7 @@ DEF_SIMPLE_OPERATOR ("delete", DELETE_EXPR, "dl", -1)
 DEF_SIMPLE_OPERATOR ("delete []", VEC_DELETE_EXPR, "da", -1)
 
 /* Unary operators.  */
-DEF_SIMPLE_OPERATOR ("+", CONVERT_EXPR, "ps", 1)
+DEF_SIMPLE_OPERATOR ("+", UNARY_PLUS_EXPR, "ps", 1)
 DEF_SIMPLE_OPERATOR ("-", NEGATE_EXPR, "ng", 1)
 DEF_SIMPLE_OPERATOR ("&", ADDR_EXPR, "ad", 1)
 DEF_SIMPLE_OPERATOR ("*", INDIRECT_REF, "de", 1)
@@ -97,8 +93,10 @@ DEF_SIMPLE_OPERATOR ("!", TRUTH_NOT_EXPR, "nt", 1)
 DEF_SIMPLE_OPERATOR ("++", PREINCREMENT_EXPR, "pp", 1)
 DEF_SIMPLE_OPERATOR ("--", PREDECREMENT_EXPR, "mm", 1)
 DEF_SIMPLE_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", 1)
-/* This is an extension.  */
+/* These are extensions.  */
 DEF_SIMPLE_OPERATOR ("alignof", ALIGNOF_EXPR, "v17alignof", 1)
+DEF_SIMPLE_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", 1)
+DEF_SIMPLE_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", 1)
 
 /* The cast operator.  */
 DEF_SIMPLE_OPERATOR ("", TYPE_EXPR, "cv", 1)
@@ -131,11 +129,8 @@ DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2)
 DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2)
 DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2)
 DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2)
-/* These are extensions.  */
-DEF_SIMPLE_OPERATOR ("<?", MIN_EXPR, "v23min", 2)
-DEF_SIMPLE_OPERATOR (">?", MAX_EXPR, "v23max", 2)
 /* This one is needed for mangling.  */
-DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2);
+DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2)
 
 /* Assignment operators.  */
 DEF_ASSN_OPERATOR ("=", NOP_EXPR, "aS", 2)
@@ -155,3 +150,6 @@ DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
 
 /* Miscellaneous.  */
 DEF_SIMPLE_OPERATOR ("()", CALL_EXPR, "cl", -1)
+
+/* Variadic templates extension. */
+DEF_SIMPLE_OPERATOR ("...", EXPR_PACK_EXPANSION, "pu", 1)