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 102659 - Parser fails on "char * __cdecl func();" expression
Summary: Parser fails on "char * __cdecl func();" expression
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-26 18:23 UTC by soldatov
Modified: 2007-06-09 08:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (13.08 KB, image/png)
2007-06-03 20:45 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-04-26 18:23:01 UTC
In code completion on windows I not found many of function from "stdio.h". I
think because parser fails on "char * __cdecl func();" expression.

Sample from Cygwin:

#define	_EXFUN(name, proto) __cdecl name proto
char *  _EXFUN(fgets, (char *, int, FILE *));
Comment 1 soldatov 2007-04-26 18:28:33 UTC
On windows:
_cdecl=__attribute__((__cdecl__))
Comment 2 Vladimir Kvashin 2007-05-29 06:06:10 UTC
Does not repeat any more.
Fixed by one of the previous commits (most likely by vv159170)
Comment 3 soldatov 2007-06-03 20:42:47 UTC
Under Windows XP bug can be reproduced
Comment 4 soldatov 2007-06-03 20:45:05 UTC
Created attachment 43164 [details]
screenshot
Comment 5 Vladimir Kvashin 2007-06-05 13:17:34 UTC
Though the issue occurs on Windows, it's root isn't really Windows-specific. I
was finally able to reproduce it on Solaris as well.

The minimal example is:

#define __cdecl __attribute__((__cdecl__))
char * __cdecl foo(int a, int b);

The above function representation in code model has an empty name and no
parameters. If I change the return type to char (instead of char*), the effect
disappears.

Comment 6 Vladimir Kvashin 2007-06-05 21:10:41 UTC
Checking in cppparser.g;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/parser/cppparser.g,v
 <--  cppparser.g
new revision: 1.1.2.11.4.9; previous revision: 1.1.2.11.4.8
done

Unit tests are updated as well
Comment 7 soldatov 2007-06-09 08:05:54 UTC
Verified in 20070609 build