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 246684 - C++: global variable in initialization list
Summary: C++: global variable in initialization list
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: PC Solaris
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-25 15:50 UTC by Alexander Simon
Modified: 2016-03-16 08:12 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 Alexander Simon 2014-08-25 15:50:07 UTC
Unresolved i.
Code:

#include <iostream>

int i = 1;

struct A {
    int a;
    A() : a((int)::i) {}
};

int main() {
    A a;
    std::cout << a.a << std::endl;
    return 0;
}
Comment 1 Alexander Simon 2015-10-01 09:51:15 UTC
Petr,
please reevaluate the target milestone or/and priority.
According target milestone and CR rules it must be fixed in NetBeans 8.1.
Comment 2 petrk 2015-10-28 13:03:08 UTC
Fixed at enum. Changeset: 303707:5f59b044c183
Comment 3 Quality Engineering 2015-10-30 02:22:06 UTC
Integrated into 'main-silver', will be available in build *201510300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/59580494d27b
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #246684 - C++: global variable in initialization list
(transplanted from 5f59b044c1836b109dd3f193591bdfece61322da)
Comment 4 Alexander Simon 2015-11-17 12:47:46 UTC
v.
Comment 5 soldatov 2015-11-20 11:58:57 UTC
Verified in NetBeans 8.1patch1