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 196817 - recognize gcc alternate keywords like __inline__, __asm__
Summary: recognize gcc alternate keywords like __inline__, __asm__
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 17:09 UTC by sopko
Modified: 2011-07-26 13:56 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 sopko 2011-03-17 17:09:09 UTC
Product Version = NetBeans IDE Dev (Build 201103170400)
Operating System = Windows Vista version 6.0 running on x86
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) Client VM 19.1-b02

I'm using NetBeans C/C++ with MinGW (gcc)
and gcc allows the use of the alternative keywords __inline__ for inline for compatibly reasons
details here: 
http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html

When using these keywords NetBeans shows the warning 'Unable to resolve identifier'.
is it possible to change this so they are recognizes as keywords?
(even with an info or hint but don't underline it red)
Comment 1 Vladimir Voskresensky 2011-03-17 20:46:10 UTC
it's strange if __asm__ doesn't work in your case.
to make __inline__ work in your current version you can go to C/C++ options and in Code Assistance add extra macro definitions:
__inline__ inline
Comment 2 Vladimir Voskresensky 2011-03-17 21:06:47 UTC
http://hg.netbeans.org/cnd-main/rev/4bf11ba3b928
Comment 3 Quality Engineering 2011-03-18 09:46:08 UTC
Integrated into 'main-golden', will be available in build *201103180400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/4bf11ba3b928
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #196817 -  recognize gcc alternate keywords like __inline__, __asm__
Comment 4 sopko 2011-03-19 17:15:02 UTC
(In reply to comment #1)
> it's strange if __asm__ doesn't work in your case.
> to make __inline__ work in your current version you can go to C/C++ options and
> in Code Assistance add extra macro definitions:
> __inline__ inline

yes, only had the issue with __inline__, but wanted to note that there are more alternative keywords.
Thanks for the fast fix, works fine.
Comment 5 Vladimir Voskresensky 2011-03-20 21:12:49 UTC
(In reply to comment #4)
> (In reply to comment #1)
> > it's strange if __asm__ doesn't work in your case.
> > to make __inline__ work in your current version you can go to C/C++ options and
> > in Code Assistance add extra macro definitions:
> > __inline__ inline
> 
> yes, only had the issue with __inline__, but wanted to note that there are more
> alternative keywords.
we support a lot of them :-)

http://hg.netbeans.org/main/file/tip/cnd.lexer/src/org/netbeans/cnd/api/lexer/CppTokenId.java

> Thanks for the fast fix, works fine.
you are welcome