how do I promise const to the optimizer?

John (Eljay) Love-Jensen eljay@adobe.com
Wed Apr 25 12:20:00 GMT 2007


Hi Marco,

Does this work:

int bar(const val *__restrict__ x, const int t)
{
  const int value = x->tag * t;
  return fun(x, value) + fun(x, value);
}

Should optimize nicely.

HTH,
--Eljay



More information about the Gcc-help mailing list