This is the mail archive of the gcc-help@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: how do I promise const to the optimizer?


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


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