Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329425 - Issue handling #include within a struct
Summary: Issue handling #include within a struct
Status: CLOSED DUPLICATE of bug 315964
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 07:40 EDT by James Blackburn CLA
Modified: 2010-11-05 04:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-11-04 07:40:22 EDT
We've got some embedded application code that is raising lots of codan errors of field can't be resolved.  What they're doing is #include'ing a header within a struct which appears to confused the parser.

e.g.:

foo.h:
MY_DEF(a, b, c)

foo.c:
#define MY_DEF(X,Y,Z) int X;
typedef struct tag_FooType
{
  #include "foo.h"
} Foo;
Foo foo;


void main() {
	foo.a  = 1;            // <= parser error here
}

Substituting MY_DEF(a,b,c) for the #include makes the error go away.
Comment 1 Markus Schorn CLA 2010-11-05 04:55:47 EDT
Essentially the same as bug 315964.

*** This bug has been marked as a duplicate of bug 315964 ***