diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-18 18:43:54 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-18 18:43:54 -0800 |
| commit | 0697fbd3f0d9083223de23ea16c1754de0d8c28b (patch) | |
| tree | 19beafacc89818ad8ee889494f8922085e4b871e /include/linux/compiler-gcc3.h | |
| parent | 477702e9c136022c858d8b4f59832c5a4eafe526 (diff) | |
[PATCH] const vs. __attribute__((const)) confusion
From: "H. Peter Anvin" <hpa@zytor.com>
Declaring a function to return a const scalar value is pretty meaningless.
These functions are really trying to say that they don't alter any external
state.
Fix that up by using __attribute__((const)), if the compiler supports that.
Diffstat (limited to 'include/linux/compiler-gcc3.h')
| -rw-r--r-- | include/linux/compiler-gcc3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 4eac3db89fda..22230e40873e 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h @@ -20,3 +20,4 @@ #endif #define __attribute_pure__ __attribute__((pure)) +#define __attribute_const__ __attribute__((__const__)) |
