| Submitter | Basile Starynkevitch |
|---|---|
| Date | Oct. 18, 2010, 5 p.m. |
| Message ID | <20101018190058.f77cb42c.basile@starynkevitch.net> |
| Download | mbox | patch |
| Permalink | /patch/68210/ |
| State | New |
| Headers | show |
Comments
2010/10/18 Basile Starynkevitch <basile@starynkevitch.net>: > 2010-10-18 Basile Starynkevitch <basile@starynkevitch.net> > * gengtype (new_structure): Remove ad-hoc "location_s" processing. * gengtype.c OK with ChangeLog fix and... /* temporary kludge - gengtype doesn't handle conditionals or macros. Ignore any attempt to define struct location_s, unless it is coming from this file (main() sets it up safely). */ if (!strcmp (name, "location_s") && !isunion && pos->file != this_file) return find_structure (name, 0); ...this fragment removed too (beginning of new_structure). BTW grep shows that location_s is mentioned in a comment in libcpp/include/input.h, bonus points if you take care of that too :) Thanks,
Patch
Index: gcc/gengtype.c =================================================================== --- gcc/gengtype.c (revision 165645) +++ gcc/gengtype.c (working copy) @@ -756,20 +756,6 @@ new_structure (const char *name, int isunion, stru if (s->u.s.lang_struct) s->u.s.lang_struct->u.s.bitmap |= bitmap; - /* Reset location_s's location to input.h so that we know where to - write out its mark routine. */ - if (!strcmp (name, "location_s") && !isunion && pos->file == this_file) - { - size_t n; - for (n = 0; n < num_gt_files; n++) - if (!strcmp (gt_files[n] + strlen (gt_files[n]) - strlen ("input.h"), - "input.h")) - { - s->u.s.line.file = gt_files[n]; - break; - } - } - return s; }