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 229185 - __restrict__ keyword combinations are not parsed by Netbeans editor
Summary: __restrict__ keyword combinations are not parsed by Netbeans editor
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
: 216070 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-29 22:01 UTC by crimcat
Modified: 2016-10-31 10:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of "unexpected token: restrict" error. (34.64 KB, image/png)
2016-09-25 14:13 UTC, Alxv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description crimcat 2013-04-29 22:01:04 UTC
The test example:
----
int
function(char* __restrict__* __restrict__ p1, char* __restrict__* __restrict__ p2) {
    return 0;
}
int main(int argc, char** argv) {
    char *str_a = argv[1];
    char *str_b = argv[2];
    return function(&str_a, &str_b);
}
----
GCC can compile this code without a complain. But, Netbeans editor indicates unexpected token __restrict__ in the declaration of function(). It seems that it cannot parse double indirect restricted pointers.
Comment 1 Alexander Simon 2014-02-13 06:44:28 UTC
It seems the bug #216070 is a duplicate of this.
(At least a fix will be common)
Comment 2 Alexander Simon 2014-02-19 14:18:09 UTC
*** Bug 216070 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Simon 2014-02-19 14:18:41 UTC
(In reply to Alexander Simon from comment #2)
> *** Bug 216070 has been marked as a duplicate of this bug. ***

Declarations containing restrict qualifiers are sometimes displayed as errors although they are correct, for example

    int *restrict *restrict p1;

or

    typedef int *intptr_t;
    restrict intptr_t p2;

(in a C file, with "C standard" in the project settings set to C99)(In reply to Alexander Simon from comment #2)
> *** Bug 216070 has been marked as a duplicate of this bug. ***
Comment 4 Vladimir Voskresensky 2014-11-19 13:43:19 UTC
confirmed
Comment 5 Alxv 2016-09-25 14:13:03 UTC
Created attachment 162204 [details]
Screenshot of "unexpected token: restrict" error.

It is also the same problem with "restrict" keyword. And because of this NetBeans unable to resolve appropriate function (see screenshot). And it is impossible to use cool Refactor->Rename NetBeans feature.