lkml.org 
[lkml]   [2007]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Replace __attribute_pure__ with __pure
Date
Trimmed the CC list a bit

On Oct 05, 2007, at 20:51:21, H. Peter Anvin wrote:
> Ralf Baechle wrote:
>> To be consistent with the use of attributes in the rest of the
>> kernel replace all use of __attribute_pure__ with __pure and
>> delete the definition of __attribute_pure__.
>
> Concern: __attribute_pure__ is very similar to __attribute_const__,
> which is almost completely, but not totally unlike the keyword
> "const"...

Yes, there's also the fact that __pure is a reserved GCC keyword.
Essentially according to GCC docs all of the GCC-specific keywords
are equivalently defined as "keyword", "__keyword", and
"__keyword__", with only the latter two defined in strict-ANSI mode.
The following is valid according to GCC docs:

static int __attribute__((__pure)) my_strlen(const char *str);

With the proposed definition of __pure, that becomes a noticeably
invalid __attribute__((__attribute__((__pure__))))


Cheers,
Kyle Moffett

-
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: 2007-10-06 20:53    [W:0.044 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site