From 6a35b2d72ad37ff51f59485b138b37a28c47eaa9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 4 Dec 2013 13:51:41 +1100 Subject: Compiler Warnings: disallow 'long' in DNA, its not reliably 64bit (gcc only) --- source/blender/makesdna/intern/makesdna.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesdna/intern/makesdna.c') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 2665da1b435..aac79245501 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1209,6 +1209,14 @@ int main(int argc, char **argv) #endif /* if 0 */ +/* even though DNA supports, 'long' shouldn't be used since it can be either 32 or 64bit, + * use int or int64_t instead. + * Only valid use would be as a runtime variable if an API expected a long, + * but so far we dont have this happening. */ +#ifdef __GNUC__ +# pragma GCC poison long +#endif + #include "DNA_listBase.h" #include "DNA_vec_types.h" #include "DNA_ID.h" -- cgit v1.2.3