blob: 0b7c39851b384ee7246103a82758dffb10e75d28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
'\" t
.\" Copyright 1989-1993, The Regents of the University of California.
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.TH operator 7 (date) "Linux man-pages (unreleased)"
.SH NAME
operator \- C operator precedence and order of evaluation
.SH DESCRIPTION
This manual page lists C operators and their precedence in evaluation.
.P
.TS
lb lb lb
l l l.
Operator Associativity Notes
() _Generic() - [1]
[] () . \-> ++ \-\- (type){} left to right [2] [3]
++ \-\- & * + \- \[ti] ! _Countof sizeof alignof right to left [4]
(type) right to left
* / % left to right
+ \- left to right
<< >> left to right
< > <= >= left to right
== != left to right
& left to right
\[ha] left to right
| left to right
&& left to right
|| left to right
?: right to left
= *= /= %= += \-= <<= >>= &= \[ha]= |= right to left
, left to right
.TE
.P
The following notes provide further information to the above table:
.P
.PD 0
.IP [1] 5
The () at this precedence is the parenthesized expression.
.IP [2]
The () at this precedence is the function call operator.
.IP [3]
The ++ and \-\- operators at this precedence level are
the postfix flavors of the operators.
.IP [4]
The ++ and \-\- operators at this precedence level are
the prefix flavors of the operators.
.PD
|