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]

gcc behavior re const optimization



I tried reposting this many times, as our provider was listed on ORBS:


> > I just subscribed to this list. I would like to know if this is the
> > right place to ask for specific optimizations performed by gcc.

[...]

> Should be the right place,
> just make direct questions.

Well, I've been up to now writing code without using const. I always
thought I'd start using it when optimizers would make good use of it
(I won't argue whether this is a good or bad reason to switch :))

I was just interested to know if gcc could take advantage of const
correctness to optimize generated code, which kind of optimizations
gcc would be likely to perform, and what programming practices are
likely to help the optimizer spot these optimizations.

If there is some docs about this, I'd be happy to know where to look,
but I haven't found any.

Thanks for your help!

-- 
Lyrian

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