Message ID | CABu31nMW3330rZ3WMf3DcuhXCFN+mknHATbem5oY5VUUZugh-A@mail.gmail.com |
---|---|
State | New |
Headers | show |
2012/7/24 Steven Bosscher <stevenb.gcc@gmail.com>: > On Tue, Jul 24, 2012 at 12:11 PM, Laurynas Biveinis > <laurynas.biveinis@gmail.com> wrote: >>> I think it merely points to a bogus GTY annotation, not sure if we want to >>> gobble this kind of gengtype hacks which only benefit -O0 ... >> This one indeed looks redundant, are there others? > > Yes: (...) Thanks, looking into it. >> I am wondering if >> there is something that would produce an empty loop for GC but not for >> PCH or the other way around. > > You're the one who's supposed to understand all of this best ;-) It takes a long time to swap this back in :)
Index: gengtype.c =================================================================== --- gengtype.c (revision 189778) +++ gengtype.c (working copy) @@ -1256,7 +1256,17 @@ adjust_field_type (type_p t, options_p opt) for (; opt; opt = opt->next) if (strcmp (opt->name, "length") == 0) - length_p = 1; + { + if (length_p) + error_at_line (&lexer_line, "duplicate `%s' option", opt->name); + if (t->u.p->kind == TYPE_SCALAR && ! t->u.p->u.scalar_is_char) + { + error_at_line (&lexer_line, + "option `%s' may not be applied to arrays of scalar types", + opt->name); + } + length_p = 1; + } else if ((strcmp (opt->name, "param_is") == 0 || (strncmp (opt->name, "param", 5) == 0