lkml.org 
[lkml]   [2003]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: const versus __attribute__((const))
Arnd Bergmann wrote:
> H. Peter Anvin writes:
>
>>I have made a patch against the current tree defining
>>__attribute_const__ in <linux/compiler.h> and using it in the above
>>cases; does anyone know any reason why I should *NOT* submit this to
>>Linus?
>
>
> I noticed before that gcc appearantly ignores __attribute__((const))
> for inline functions, so both the original and your proposed code
> is rather pointless as an optimization, except for extern declarations.
>
> I'd rather remove the 'const' completely where it causes warnings for
> inline functions.
>

These functions are available to userspace, though, and can be compiled
with -O0; thus not inlined.

-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.029 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site