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

Summary: Parser reports false errors when declaring functions
Product: cnd Reporter: StasRWS
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal CC: alexvsimon
Priority: P3    
Version: 7.3.1   
Hardware: All   
OS: Unix   
Issue Type: DEFECT Exception Reporter:

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))();