Re: const from include/asm-i386/byteorder.h

Gianni Tedesco (gianni@scaramanga.co.uk)
02 Jun 2003 14:21:15 +0100


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-4660-1054560158-0001-2
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2003-06-02 at 12:51, Nikita Danilov wrote:
> =3D=3D=3D=3D=3D include/linux/compiler.h 1.15 vs edited =3D=3D=3D=3D=3D
> --- 1.15/include/linux/compiler.h Wed Apr 9 22:15:46 2003
> +++ edited/include/linux/compiler.h Mon Jun 2 14:44:18 2003
> @@ -56,6 +56,22 @@
> #define __attribute_used__ __attribute__((__unused__))
> #endif
> =20
> +/* The attribute `pure' is not implemented in GCC versions earlier than =
2.96. */
> +#if (__GNUC__ > 2) || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 96)
> +#define __attribute_pure __attribute__ ((__pure__))
> +#else
> +#define __attribute_pure=20
> +#endif
> +
> +/* The attribute `const' is not implemented in GCC versions earlier than=
2.5. */
> +/* Basically this is just slightly more strict class than the `pure'
> + attribute */
> +#if (__GNUC__ > 2) || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 5)
> +#define __attribute_const __attribute__ ((__const__))
> +#else
> +#define __attribute_const
> +#endif
> +

I think __const_fn and __pure_fn would be a bit more descriptive and
more readable, even though that would appear to go against convention.
It's just that the 'attribute' bit is space consuming and doesn't say
much...

Just my opinion anyway.

--=20
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D

--=_courier-4660-1054560158-0001-2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Transfer-Encoding: 7bit
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQA+209KkbV2aYZGvn0RAm0hAJ92OCQaq5CrxHBDtDS7QJK3GxvBngCfYhA6
53572lQMcE27KYIU3iihqJ4=
=N8Sf
-----END PGP SIGNATURE-----

--=_courier-4660-1054560158-0001-2--