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 257908 - C pointer arithmetic doesn't work if there are no global "+" operators in a project
Summary: C pointer arithmetic doesn't work if there are no global "+" operators in a p...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-09 12:33 UTC by petrk
Modified: 2016-04-20 09:34 UTC (History)
0 users

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 petrk 2016-02-09 12:33:53 UTC
namespace bug257647 {
    
    void foo257647(int var);

    void foo257647(char *ptr);

    int main257647() {
        char *ptr1 = 0;
        char *ptr2 = 0;
        foo257647(ptr1 + 1);
        foo257647(1 + ptr1);
        foo257647(ptr1 - 1);
        foo257647(ptr2 - ptr1);
        return 0;
    }
}
Comment 1 petrk 2016-02-09 12:40:12 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/e7b24dddcf2d
Comment 2 Quality Engineering 2016-02-10 02:31:58 UTC
Integrated into 'main-silver', will be available in build *201602100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e7b24dddcf2d
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #257908 - C pointer arithmetic doesn't work if there are no global "+" operators in a project
Comment 3 Vladimir Kvashin 2016-04-15 16:59:57 UTC
verified in builds on enum server
Comment 4 soldatov 2016-04-20 09:34:27 UTC
Verified in NetBeans 8.1 with latest updates.