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: [m32c] reject illegal subregs of hard regs


> > +  for (i = 0; i < sizeof(legal_subregs)/sizeof(legal_subregs[0]); i ++)
> 
> You don't have to use sizeof here, you can use the ARRAY_SIZE macro:
> 
> for (i = 0; i < ARRAY_SIZE (legal_subregs); i++)

Cool, next time I'm committing a change I'll try to remember that.  I
get so used to doing that in non-gcc contexts...


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