public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni@scaramanga.co.uk>
To: Nikita Danilov <Nikita@Namesys.COM>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>,
	Linus Torvalds <Torvalds@Transmeta.COM>,
	Andrew Morton <AKPM@Digeo.COM>
Subject: Re: const from include/asm-i386/byteorder.h
Date: 02 Jun 2003 14:21:15 +0100	[thread overview]
Message-ID: <1054560074.4829.9.camel@sherbert> (raw)
In-Reply-To: <16091.14923.815819.792026@laputa.namesys.com>

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

On Mon, 2003-06-02 at 12:51, Nikita Danilov wrote:
> ===== include/linux/compiler.h 1.15 vs edited =====
> --- 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
>  
> +/* The attribute `pure' is not implemented in GCC versions earlier than 2.96. */
> +#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
> +#define __attribute_pure __attribute__ ((__pure__))
> +#else
> +#define __attribute_pure 
> +#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__ == 2 && __GNUC_MINOR__ >= 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.

-- 
// 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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2003-06-02 13:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-31 14:10 const from include/asm-i386/byteorder.h Nikita Danilov
2003-05-31 18:49 ` Gianni Tedesco
2003-05-31 18:57   ` William Lee Irwin III
2003-06-02 11:51     ` Nikita Danilov
2003-06-02 12:14       ` William Lee Irwin III
2003-06-02 12:36         ` Nikita Danilov
2003-06-02 12:40           ` William Lee Irwin III
2003-06-02 12:59             ` Nikita Danilov
2003-06-02 13:08               ` William Lee Irwin III
2003-06-02 13:21       ` Gianni Tedesco [this message]
2003-06-02 13:37       ` Adrian Bunk
2003-06-02 14:46         ` Nikita Danilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1054560074.4829.9.camel@sherbert \
    --to=gianni@scaramanga.co.uk \
    --cc=AKPM@Digeo.COM \
    --cc=Linux-Kernel@Vger.Kernel.ORG \
    --cc=Nikita@Namesys.COM \
    --cc=Torvalds@Transmeta.COM \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox