This is the mail archive of the gcc@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: Empty loop elimination in 4.0 ?


This:
int *f;
int i;
for (i=0;i<10;i++)
 f[i] = 0;

will be converted to:

memset (f, 0, i * sizeof(*f));
for (i=0;i<10;i++)
 ;
....but

for (i=0;i<10;i++)
  f[i] = x;

can't be converted in

memset (f, x, i * sizeof(*f));

for every x.


Luca.



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