summaryrefslogtreecommitdiff
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-27 00:25:11 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-27 00:25:11 -0800
commit0e587b5daec9f4db079d9194af366684e23d98b1 (patch)
treeebeb22222526b8aaf52abb4f773baa448ad90b34 /include/linux/compiler.h
parent94c923eeadc6989facea987ed34dd90bf152d784 (diff)
Add '__nocast' sparse annotation to allow people to mark places
where implicit casts are not appropriate. This can be used to mark unsigned integers as being uncastable to signed, for example. Or enums as not degrading to integers and vice versa.
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 73d957f2765d..487725cf0d0d 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -8,6 +8,7 @@
# define __kernel /* default address space */
# define __safe __attribute__((safe))
# define __force __attribute__((force))
+# define __nocast __attribute__((nocast))
# define __iomem __attribute__((noderef, address_space(2)))
# define __acquires(x) __attribute__((context(0,1)))
# define __releases(x) __attribute__((context(1,0)))
@@ -21,6 +22,7 @@ extern void __chk_io_ptr(void __iomem *);
# define __kernel
# define __safe
# define __force
+# define __nocast
# define __iomem
# define __chk_user_ptr(x) (void)0
# define __chk_io_ptr(x) (void)0