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 190747 - Unresolved identifiers in C code
Summary: Unresolved identifiers in C code
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0
Hardware: PC All
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 12:35 UTC by Alexander Pepin
Modified: 2013-05-07 11:21 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 Pepin 2010-10-04 12:35:07 UTC
Steps to reproduce:
- create a new application
- add C file with the following code:
#include <stdlib.h>

enum color { RED, YELLOW, GREEN, BLUE };
enum shape { CIRCLE, SQUARE, TRIANGLE };

struct cnode 
{
   enum color     paint;
   struct cnode*  next;
}

main()
{
   struct cnode  paintpot;
   struct cnode*  ptemp=0 ;
   enum shape  object;

   paintpot.paint = RED;
   paintpot.next  = ptemp;
   object = CIRCLE;
}

Result: A lot of unresolved identifiers red signs appear whereas the file can be built successfully.
To fix the problem a user should type semicolon after struct code definition:
struct cnode 
{
   enum color     paint;
   struct cnode*  next;
};
but without a semicolon it's still valid C code.
Comment 1 nnnnnk 2010-10-18 15:19:52 UTC
Here struct cnode is a main return type.

If you add "int" before main code will be uncompilable.

I guess it's a P4.