Re: Mark bitrevX() functions as const

From: David Howells
Date: Mon Dec 11 2006 - 09:19:37 EST


Jeff Garzik <jeff@xxxxxxxxxx> wrote:

> > I'm not sure that's a good idea. You have to be careful not to cause
> > confusion with ordinary "const".
>
> It's all in the naming. You could call it 'purefunc' or somesuch.

No, not "pure". That's something else.

> __attribute__ is very very ugly, an hinders a quick scan of the function
> prototype, particularly if it has a boatload of other attributes.

Maybe you should do:

extern __attibute__((x, y, z))
void function_prototype(...);

Then it doesn't hinder it anywhere near as much as, say:

extern void __fastcall function_prototype(...);

Besides, emacs lights up __attribute__'s in funky colours to make them easier
to look past:-)

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