Closed
Bug 510190
Opened 16 years ago
Closed 16 years ago
treehydra_generated.c fails to compile with latest gcc 4.5 trunk
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Swatinem, Assigned: taras.mozilla)
References
Details
Attachments
(1 file)
|
3.05 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
treehydra_generated.c: In function 'lazy_lang_decl_min':
treehydra_generated.c:1205: error: 'struct lang_decl_min' has no member named 'u'
I will hopefully find time soon to look into this failure.
| Reporter | ||
Comment 1•16 years ago
|
||
cp/cp-tree.h contains this struct:
struct GTY(()) lang_decl_min {
struct lang_decl_base base;
[…]
union lang_decl_u2 {
[…]
} GTY ((desc ("%0.u.base.u2sel"))) u2;
};
which is then converted by convert_tree.js callUnion and getUnionResolver to
convert_lang_decl_u2_union (this, (*topmost).u.base.u2sel, &topmost->u2, obj_u2);
where getUnionResolver uses the "desc" provided in the gcc header, which is clearly wrong as it points to a non existing member thus causing the build failure.
I believe this is clearly a bug in the gcc header and needs to be fixed in gcc rather than dehydra, right?
| Assignee | ||
Comment 2•16 years ago
|
||
(In reply to comment #1)
> I believe this is clearly a bug in the gcc header and needs to be fixed in gcc
> rather than dehydra, right?
yes. I'm surprised this doesn't make gcc angry during compilation.
| Assignee | ||
Comment 3•16 years ago
|
||
This is not a bug in gcc. This is a bug in my understanding of the GTY "spec" :(
I assumed %0 meant outermost struct in stuff like struct outermost { struct nested{}}. But it seems what it actually means is that %0 is outermost struct for structs declared by value.
This basically means that I have to "inline" more aggressively :(
| Assignee | ||
Comment 4•16 years ago
|
||
There are two solutions here. One is to figure out exactly how gengtype nests structs and do the same thing. I don't feel that it is a good idea to generate bloated binding functions, nor do I feel like rewriting the whole of convert_type.js paradigm to be that way.
Alternative is to traverse the struct member graph and figure out exactly which structs need to be "inlined" for %0 to work. That's what this patch does.
In fact, using this approach results in more sensible code and better utilization of dehydra features(instead of ad-hoc ways of doing this as I do currently). Unfortunately I broke Treehydra for 4.3 when I utilized this for all of the gty %tags, so I wont be revisiting that until I no longer have to support multiple compilers.
Attachment #414567 -
Flags: review?(benjamin)
Updated•16 years ago
|
Attachment #414567 -
Attachment is patch: true
Attachment #414567 -
Attachment mime type: application/octet-stream → text/plain
Comment 5•16 years ago
|
||
Comment on attachment 414567 [details] [diff] [review]
workaround
spelling nit s/nexted/nested/
Attachment #414567 -
Flags: review?(benjamin) → review+
| Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•