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: | typeof keyword not recognized by C++ parser | ||
---|---|---|---|
Product: | cnd | Reporter: | michaelkourlas |
Component: | Code Model | Assignee: | petrk |
Status: | VERIFIED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 10 x64 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
michaelkourlas
2017-03-28 14:10:09 UTC
Can you, please, provide a compilation command? As far as I know GCC doesn't support typeof extension in C++, only in C. Therefore I'm confused because your test case uses iostream. However, there is a keyword __typeof__ which works both in C and C++. So, I think that we need to add support for typeof into C language and for __typeof__ into both languages. Do you agree? The commands I'm using to compile and execute are nothing special: g++ main.cpp -o main ./main However, this is on GCC 4.6.4, which is pretty old. I believe "__typeof__" must be used if you're compiling in standards mode, but by default GCC accepts "typeof" as a non-standard extension. To be clear, though, I believe that GCC indeed supports the "typeof" keyword in C++, not just C. Fixed at enum: 315028:4b94e16d83c2 Integrated into 'main-silver', will be available in build *201704110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3b32f280b5fe User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #270231 - typeof keyword not recognized by C++ parser (transplanted from e238ee10b99de88e3e79086cb9d7d8acd2ec82c7) (transplanted from 4b94e16d83c2d117d977b7b3155ebadacfdf7a98) https://netbeans.org/bugzilla/show_bug.cgi?id=270231 Changesets: http://hg.netbeans.org/releases/rev/4b94e16d83c2 # Fixed #270231 - typeof keyword not recognized by C++ parser http://hg.netbeans.org/releases/rev/090487d610f8 # Additional fix for bug #270231 - typeof keyword not recognized by C++ parser Verified in NetBeans IDE 8.2 (Build 201704181436) |