diff options
author | Wim <wim@42.be> | 2022-03-12 23:02:04 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2022-03-20 14:57:48 +0100 |
commit | aefa70891cfd489fccb8a9567b5bdafb0f863ede (patch) | |
tree | 90fe7c91d7b33b2a1ed08ea3a94840860adc6fc1 /vendor/modernc.org/ccgo/v3/lib/go.go | |
parent | 1b9877fda45be021ea6a5677c78648cecc19dcd5 (diff) | |
download | matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.tar.gz matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.tar.bz2 matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.zip |
Update vendor (whatsapp)
Diffstat (limited to 'vendor/modernc.org/ccgo/v3/lib/go.go')
-rw-r--r-- | vendor/modernc.org/ccgo/v3/lib/go.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/modernc.org/ccgo/v3/lib/go.go b/vendor/modernc.org/ccgo/v3/lib/go.go index 8e6bccc7..fc869395 100644 --- a/vendor/modernc.org/ccgo/v3/lib/go.go +++ b/vendor/modernc.org/ccgo/v3/lib/go.go @@ -3117,6 +3117,9 @@ func (p *project) declaratorDecay(n cc.Node, f *function, d *cc.Declarator, t cc return } + if !local.isPinned { + p.err(n, "%v: %v: missed pinning", n.Position(), d.Position(), d.Name()) + } p.w("(%s%s)/* &%s[0] */", f.bpName, nonZeroUintptr(local.off), local.name) return } @@ -8135,6 +8138,11 @@ func (p *project) castExpressionValue(f *function, n *cc.CastExpression, t cc.Ty case cc.CastExpressionUnary: // UnaryExpression p.unaryExpression(f, n.UnaryExpression, t, mode, flags) case cc.CastExpressionCast: // '(' TypeName ')' CastExpression + if f != nil && p.pass1 && n.TypeName.Type().IsIntegerType() && n.CastExpression.Operand.Type().Kind() == cc.Array { + if d := n.CastExpression.Declarator(); d != nil { + f.pin(n, d) + } + } switch k := p.opKind(f, n.CastExpression, n.CastExpression.Operand.Type()); k { case opNormal, opBitfield: p.castExpressionValueNormal(f, n, t, mode, flags) @@ -12561,7 +12569,7 @@ func (p *project) iterationStatement(f *function, n *cc.IterationStatement) { break } - v := "ok" + v := "__ccgo" if !p.pass1 { v = f.scope.take(cc.String(v)) } |