File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
c/common/src/codingstandards/c Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ module Ordering {
13
13
/**
14
14
* Holds if `e1` is sequenced before `e2` as defined by Annex C in ISO/IEC 9899:2011
15
15
* This limits to expression and we do not consider the sequence points that are not amenable to modelling:
16
- * - after a full declarator as described in 6.7.6 point 3.
17
16
* - before a library function returns (see 7.1.4 point 3).
18
17
* - after the actions associated with each formatted I/O function conversion specifier (see 7.21.6 point 1 & 7.29.2 point 1).
19
18
* - between the expr before and after a call to a comparison function,
@@ -68,6 +67,24 @@ module Ordering {
68
67
// The side effect of updating the stored value of the left operand is sequenced after the value computations of the left and right operands.
69
68
// See 6.5.16
70
69
e2 .( Assignment ) .getAnOperand ( ) .getAChild * ( ) = e1
70
+ or
71
+ // There is a sequence point after a full declarator as described in 6.7.6 point 3.
72
+ exists ( DeclStmt declStmt , int i , int j | i < j |
73
+ declStmt
74
+ .getDeclarationEntry ( i )
75
+ .( VariableDeclarationEntry )
76
+ .getVariable ( )
77
+ .getInitializer ( )
78
+ .getExpr ( )
79
+ .getAChild * ( ) = e1 and
80
+ declStmt
81
+ .getDeclarationEntry ( j )
82
+ .( VariableDeclarationEntry )
83
+ .getVariable ( )
84
+ .getInitializer ( )
85
+ .getExpr ( )
86
+ .getAChild * ( ) = e2
87
+ )
71
88
)
72
89
}
73
90
You can’t perform that action at this time.
0 commit comments