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.
Summary: | error processing simple macro #define | ||
---|---|---|---|
Product: | cnd | Reporter: | jaisondaniel <jaisondaniel> |
Component: | Code Model | Assignee: | issues@cnd <issues> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | macro processing error |
Not reproducible in current development build. Please verify the issue in the last development build. Thank You for the information. I cannot verify in the dev build. But Once the next release happen I will verify this issue on the released version atleast beta version but not the dev build. |
Created attachment 155545 [details] macro processing error macro is not processing correctly. take the following piece of code in netbeans 8.1beta, not sure about other version. ------------------------------------------------------------------- //#define ASIZE 6 // uncomment this to see the error in IDE int ASIZE=6; // comment this to see the error in IDE void printArray(int a[]) { for(int i=0; i<ASIZE; i++) { cout << a[i] << ", " << endl; } } int main(int argc, char** argv) { int a[] = { 12, 23, 34, 45, 56, 67, 78, 89 }; printArray(a); return 0; } ------------------------------------------------------------------- No issue on compilation or running. even no issue in the IDE code processing. But the same code instead of variable if you use macro #define then you can see the code processing error "Unable to resolve identifier" for all the variables and the function which the function is using the macro variable. ------------------------------------------------------------------- #define ASIZE 6 // uncomment this to see the error in IDE //int ASIZE=6; // comment this to see the error in IDE void printArray(int a[]) { for(int i=0; i<ASIZE; i++) { cout << a[i] << ", " << endl; } } int main(int argc, char** argv) { int a[] = { 12, 23, 34, 45, 56, 67, 78, 89 }; printArray(a); return 0; } ------------------------------------------------------------------- Please see the attached screen-shot.