From 0e587b5daec9f4db079d9194af366684e23d98b1 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 27 Mar 2005 00:25:11 -0800 Subject: 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. --- include/linux/compiler.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') 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 -- cgit v1.2.3