This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 234121 - Parser reports false errors when declaring functions
Summary: Parser reports false errors when declaring functions
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3.1
Hardware: All Unix
: P3 normal with 1 vote (vote)
Assignee: petrk
URL:
Keywords:
: 242971 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-08 08:29 UTC by StasRWS
Modified: 2014-11-21 12:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description StasRWS 2013-08-08 08:29:46 UTC
When using a little more complex declarations the parser seems to detect errors where there are none. For example:
1. 
int (*(*f3(int z))(double ))(float ){
        return NULL;
}
Which is a declaration of a function returning a pointer to a function returning a pointer to a function.
2.
char (* ( *f())[])(){
    return NULL;
}
Which is a function returning a pointer to an array of pointers to functions.

All the above cases are highlighted with numerous errors like: Unexpected token {, Unexpected token } , Unresolved symbol f3 ,etc.
It's very hard and confusing to work this way because it ruins highlighting in the rest of the file too.
Comment 1 petrk 2014-11-21 12:29:39 UTC
*** Bug 242971 has been marked as a duplicate of this bug. ***
Comment 2 petrk 2014-11-21 12:30:24 UTC
Also:
typedef void (*(*fptr_T) (int *, int))();