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 228515 - Support legacy code with __global identifiers
Summary: Support legacy code with __global identifiers
Status: STARTED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.4
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-12 12:05 UTC by Alexander Simon
Modified: 2013-04-17 02:05 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 2013-04-12 12:05:02 UTC
__global became a new keyword.
Legacy code can use __global and compiler produce error messages if the keyword __global is used as an identifier.
To workaround the problem, add 
#pragma disable_ldscope
to the beginning of acompilation unit and 
#pragma enable_ldscope
to the end
Between pragmas you can use __global as an identifier.
Code examole:

#pragma disable_ldscope
int __global = 8;
#pragma enable_ldscope
int main(int argc, char**argv) {
    return 0;
}
Comment 1 Quality Engineering 2013-04-17 02:05:06 UTC
Integrated into 'main-golden', will be available in build *201304162301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2e8e4b696d5a
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixing #228515 - Support legacy code with __global identifiers
- support pragma for pp clients which uses getFilteredTokenStream