Open matneu opened 9 years ago
Thanks for the report! When joern does not fully recognize a statement as such, it outputs just the tokens and reports no error. In terms of error handling, this is what we want from a fuzzy parser. However, we should tune the parser to be able to recognize statements like these as they are obviously valid, so thanks for the report.
My guess would be that it fails to recognize the "((int (*)())" cast. Could you do me a favour and check whether
int res = ((int (*)()) foo;
is already unrecognized? fabs
Thanks for the fast reply! Just tried it,
int res = ((int (*)()) foo;
is already unrecognized.
ok, thanks, confirms what I expected. We'll include a fix for this in the next release along with fixes for the other problems reported in the last couple of months.
The parser fails on some valid (but convoluted) expressions such as:
It ends up creating multiple statement nodes that will just contain one-character pieces of the whole expression. Also, it does not report an error.
Full example: