This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH 5/5] Remove const attribute on get_log2


On 05/13/2013 08:36 AM, Peter Collingbourne wrote:
> This function is not const, as it can modify log2_m and log2_m_inited.

So?  The const attribute gets gcc to treat it as const, which means
that the call of get_log2 can be deleted if unused, or the call moved
outside of a loop.  IMO this would be a bug in LLVM if it errors for this.

That said, you may be right that the attribute isn't useful, as there
may be no case within this file where the const distinction is useful.



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