Mercurial > hg > CbC > CbC_gcc
comparison gcc/cp/operators.def @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
3 This file contains definitions of the various C++ operators, | 3 This file contains definitions of the various C++ operators, |
4 including both overloadable operators (like `+') and | 4 including both overloadable operators (like `+') and |
5 non-overloadable operators (like the `?:' ternary operator). | 5 non-overloadable operators (like the `?:' ternary operator). |
6 Written by Mark Mitchell <mark@codesourcery.com> | 6 Written by Mark Mitchell <mark@codesourcery.com> |
7 | 7 |
8 Copyright (C) 2000-2018 Free Software Foundation, Inc. | 8 Copyright (C) 2000-2020 Free Software Foundation, Inc. |
9 | 9 |
10 This file is part of GCC. | 10 This file is part of GCC. |
11 | 11 |
12 GCC is free software; you can redistribute it and/or modify | 12 GCC is free software; you can redistribute it and/or modify |
13 it under the terms of the GNU General Public License as published by | 13 it under the terms of the GNU General Public License as published by |
85 DEF_OPERATOR ("!", TRUTH_NOT_EXPR, "nt", OVL_OP_FLAG_UNARY) | 85 DEF_OPERATOR ("!", TRUTH_NOT_EXPR, "nt", OVL_OP_FLAG_UNARY) |
86 DEF_OPERATOR ("++", PREINCREMENT_EXPR, "pp", OVL_OP_FLAG_UNARY) | 86 DEF_OPERATOR ("++", PREINCREMENT_EXPR, "pp", OVL_OP_FLAG_UNARY) |
87 DEF_OPERATOR ("--", PREDECREMENT_EXPR, "mm", OVL_OP_FLAG_UNARY) | 87 DEF_OPERATOR ("--", PREDECREMENT_EXPR, "mm", OVL_OP_FLAG_UNARY) |
88 DEF_OPERATOR ("->", COMPONENT_REF, "pt", OVL_OP_FLAG_UNARY) | 88 DEF_OPERATOR ("->", COMPONENT_REF, "pt", OVL_OP_FLAG_UNARY) |
89 DEF_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", OVL_OP_FLAG_UNARY) | 89 DEF_OPERATOR ("sizeof", SIZEOF_EXPR, "sz", OVL_OP_FLAG_UNARY) |
90 DEF_OPERATOR ("co_await", CO_AWAIT_EXPR, "aw", OVL_OP_FLAG_UNARY) | |
90 | 91 |
91 /* These are extensions. */ | 92 /* These are extensions. */ |
92 DEF_OPERATOR ("alignof", ALIGNOF_EXPR, "az", OVL_OP_FLAG_UNARY) | 93 DEF_OPERATOR ("alignof", ALIGNOF_EXPR, "az", OVL_OP_FLAG_UNARY) |
93 DEF_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", OVL_OP_FLAG_UNARY) | 94 DEF_OPERATOR ("__imag__", IMAGPART_EXPR, "v18__imag__", OVL_OP_FLAG_UNARY) |
94 DEF_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", OVL_OP_FLAG_UNARY) | 95 DEF_OPERATOR ("__real__", REALPART_EXPR, "v18__real__", OVL_OP_FLAG_UNARY) |
102 DEF_OPERATOR ("&", BIT_AND_EXPR, "an", OVL_OP_FLAG_BINARY) | 103 DEF_OPERATOR ("&", BIT_AND_EXPR, "an", OVL_OP_FLAG_BINARY) |
103 DEF_OPERATOR ("|", BIT_IOR_EXPR, "or", OVL_OP_FLAG_BINARY) | 104 DEF_OPERATOR ("|", BIT_IOR_EXPR, "or", OVL_OP_FLAG_BINARY) |
104 DEF_OPERATOR ("^", BIT_XOR_EXPR, "eo", OVL_OP_FLAG_BINARY) | 105 DEF_OPERATOR ("^", BIT_XOR_EXPR, "eo", OVL_OP_FLAG_BINARY) |
105 DEF_OPERATOR ("<<", LSHIFT_EXPR, "ls", OVL_OP_FLAG_BINARY) | 106 DEF_OPERATOR ("<<", LSHIFT_EXPR, "ls", OVL_OP_FLAG_BINARY) |
106 DEF_OPERATOR (">>", RSHIFT_EXPR, "rs", OVL_OP_FLAG_BINARY) | 107 DEF_OPERATOR (">>", RSHIFT_EXPR, "rs", OVL_OP_FLAG_BINARY) |
108 | |
109 /* defaultable_fn_check relies on the ordering of the comparison operators. */ | |
107 DEF_OPERATOR ("==", EQ_EXPR, "eq", OVL_OP_FLAG_BINARY) | 110 DEF_OPERATOR ("==", EQ_EXPR, "eq", OVL_OP_FLAG_BINARY) |
108 DEF_OPERATOR ("!=", NE_EXPR, "ne", OVL_OP_FLAG_BINARY) | 111 DEF_OPERATOR ("!=", NE_EXPR, "ne", OVL_OP_FLAG_BINARY) |
109 DEF_OPERATOR ("<", LT_EXPR, "lt", OVL_OP_FLAG_BINARY) | 112 DEF_OPERATOR ("<", LT_EXPR, "lt", OVL_OP_FLAG_BINARY) |
110 DEF_OPERATOR (">", GT_EXPR, "gt", OVL_OP_FLAG_BINARY) | 113 DEF_OPERATOR (">", GT_EXPR, "gt", OVL_OP_FLAG_BINARY) |
111 DEF_OPERATOR ("<=", LE_EXPR, "le", OVL_OP_FLAG_BINARY) | 114 DEF_OPERATOR ("<=", LE_EXPR, "le", OVL_OP_FLAG_BINARY) |
112 DEF_OPERATOR (">=", GE_EXPR, "ge", OVL_OP_FLAG_BINARY) | 115 DEF_OPERATOR (">=", GE_EXPR, "ge", OVL_OP_FLAG_BINARY) |
116 DEF_OPERATOR ("<=>", SPACESHIP_EXPR, "ss", OVL_OP_FLAG_BINARY) | |
117 | |
113 DEF_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", OVL_OP_FLAG_BINARY) | 118 DEF_OPERATOR ("&&", TRUTH_ANDIF_EXPR, "aa", OVL_OP_FLAG_BINARY) |
114 DEF_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", OVL_OP_FLAG_BINARY) | 119 DEF_OPERATOR ("||", TRUTH_ORIF_EXPR, "oo", OVL_OP_FLAG_BINARY) |
115 DEF_OPERATOR (",", COMPOUND_EXPR, "cm", OVL_OP_FLAG_BINARY) | 120 DEF_OPERATOR (",", COMPOUND_EXPR, "cm", OVL_OP_FLAG_BINARY) |
116 DEF_OPERATOR ("->*", MEMBER_REF, "pm", OVL_OP_FLAG_BINARY) | 121 DEF_OPERATOR ("->*", MEMBER_REF, "pm", OVL_OP_FLAG_BINARY) |
117 DEF_OPERATOR (".*", DOTSTAR_EXPR, "ds", OVL_OP_FLAG_BINARY) | 122 DEF_OPERATOR (".*", DOTSTAR_EXPR, "ds", OVL_OP_FLAG_BINARY) |