This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Stop gengtype from emitting empty loops


On Tue, Jul 24, 2012 at 11:31 AM, Laurynas Biveinis
<laurynas.biveinis@gmail.com> wrote:
>> For scalar fields or skipped fields, gengtype produces empty loops.
>
>> This patch checks for that case and breaks out if an empty loop body
>> is detected:
>> Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK?
>>
>> Ciao!
>> Steven
>
> OK, thanks!

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 ...

The annotation is libcpp/include/line-map.h

     In the example above x1 (for token "+") is going to be the same
     as y1.  x0 is the spelling location for the argument token "1",
     and x2 is the spelling location for the argument token "2".  */
  source_location * GTY((length ("2 * %h.n_tokens"))) macro_locations;

Richard.

> --
> Laurynas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]