Re: const versus __attribute__((const))
From: Arnd Bergmann (arnd_at_arndb.de)
Date: 12/08/03
- Previous message: Craig Bradney: "Re: Kernel 2.6.0-testX show stoppers"
- Maybe in reply to: H. Peter Anvin: "const versus __attribute__((const))"
- Next in thread: H. Peter Anvin: "Re: const versus __attribute__((const))"
- Reply: H. Peter Anvin: "Re: const versus __attribute__((const))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "H. Peter Anvin" <hpa@zytor.com> Date: Mon, 8 Dec 2003 16:46:42 +0100
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.
Arnd <><
-
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/
- Previous message: Craig Bradney: "Re: Kernel 2.6.0-testX show stoppers"
- Maybe in reply to: H. Peter Anvin: "const versus __attribute__((const))"
- Next in thread: H. Peter Anvin: "Re: const versus __attribute__((const))"
- Reply: H. Peter Anvin: "Re: const versus __attribute__((const))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|