aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgcc
diff options
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-10-05 08:50:05 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:28 -0700
commit12dc7e4bb89a432d397206b0cf547c351173b97f (patch)
treebc058d3573a4df3d5041608fccf63e26b7bda54f /cgcc
parente95028ed6a5b8c9a35e5ce2af136c5781799308a (diff)
downloadsparse-dev-12dc7e4bb89a432d397206b0cf547c351173b97f.tar.gz
[PATCH] graceful handling of old-style array initializers
The current gcc initializer code is too permissive, AFAICS - [0][0] 1 will be rejected by gcc too, so we shouldn't consider it "broken gcc syntax". There was another bug in there - *ep = NULL; token = initializer(ep, token); if (!expr) break; add_expression(list, expr); would not catch the case when we have e.g. .foo = <bad expression> and we end up with list polluted by EXPR_IDENTIFIER with NULL ->ident_expression. Should be if (!*ep) instead. This also cleans it up by splitting the list handling case up from the loop, and making the single initializer parsing a function of its own.
Diffstat (limited to 'cgcc')
0 files changed, 0 insertions, 0 deletions