Messages in this thread | | | From | Kyle Moffett <> | Subject | Re: [PATCH] Replace __attribute_pure__ with __pure | Date | Sat, 6 Oct 2007 14:49:57 -0400 |
| |
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/
| |