| Summary: | Issue handling #include within a struct | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | James Blackburn <jamesblackburn+eclipse> |
| Component: | cdt-parser | Assignee: | Project Inbox <cdt-parser-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Essentially the same as bug 315964. *** This bug has been marked as a duplicate of bug 315964 *** |
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.