Unop
Fixtype of unary operators
[C:6.5.3] [C:6.5.2] [C:A.2.1].
This is a tagged union type, introduced by fty::deftagsum.
Member Tags → Types
- :address → unop-address
- :indir → unop-indir
- :plus → unop-plus
- :minus → unop-minus
- :bitnot → unop-bitnot
- :lognot → unop-lognot
- :preinc → unop-preinc
- :predec → unop-predec
- :postinc → unop-postinc
- :postdec → unop-postdec
- :sizeof → unop-sizeof
This corresponds to unary-operator in the grammar in [C],
but it also includes one-argument operators
used in unary-expression and postfix-expression,
which can therefore be reasonably regarded as unary operators,
although the grammar in [C] reserves the term to only some of them.
From the standpoint of our abstract syntax,
including the additional operators under this definition of unary operators
makes things more factored and orthogonal.
The operators are
& (unary),
* (unary),
+ (unary),
- (unary),
~,
!,
++ (prefix),
-- (prefix),
++ (postfix),
-- (postfix), and
sizeof.
The latter is the variant on expressions;
see expr.
Subtopics
- Unop-case
- Case macro for the different kinds of unop structures.
- Unop-fix
- Fixing function for unop structures.
- Unopp
- Recognizer for unop structures.
- Unop-equiv
- Basic equivalence relation for unop structures.
- Unop-kind
- Get the kind (tag) of a unop structure.
- Unop-sizeof
- Unop-preinc
- Unop-predec
- Unop-postinc
- Unop-postdec
- Unop-plus
- Unop-minus
- Unop-lognot
- Unop-indir
- Unop-bitnot
- Unop-address