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: Giving hints to the compiler/optimizer (#pragma hint ...)


On Fri, 22 Jun 2018 at 11:35, U.Mutlu wrote:
>
> Jonathan Wakely wrote on 06/22/2018 11:42 AM:
> > On Fri, 22 Jun 2018 at 07:32, U.Mutlu wrote:
> >> (The manual version has of course the disadvantage that user has to define an
> >> additional variable and because of that, put the code in its own scope...)
> >
> > You don't have to change the scope:
> >
> > for (size_t i = 1, vec_sz = vec.size(); i < vec_sz; ++i)
>
> Yes, I know that, but it lacks the "const" attribute.

Does it matter? The compiler can still see it doesn't change.


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