mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Compile with gcc without -std=c99.
This commit is contained in:
1 parent
ddde376744
commit
0203d2f148
5 files changed
+38
-22
No files matched your search
@@ -992,7 +992,8 @@ func (g *gen) writeStatement(n *a.Node, depth uint32) error {
|
||||
// TODO: arrays of arrays.
|
||||
cv := n.XType().ArrayLength().ConstValue()
|
||||
// TODO: check that cv is within size_t's range.
|
||||
g.printf("for (size_t i = 0; i < %d; i++) { %s%s[i] = 0; }\n", cv, vPrefix, n.Name().String(g.tm))
|
||||
g.printf("{ size_t i; for (i = 0; i < %d; i++) { %s%s[i] = 0; }}\n",
|
||||
cv, vPrefix, n.Name().String(g.tm))
|
||||
} else {
|
||||
g.printf("%s%s = ", vPrefix, n.Name().String(g.tm))
|
||||
if v := n.Value(); v != nil {
|
||||
|
||||
Reference in new issue
Block a user