]> code.delx.au - gnu-emacs/blobdiff - src/conf_post.h
Replace IF_LINT by NONVOLATILE and UNINIT
[gnu-emacs] / src / conf_post.h
index 762aa7727fd5f1ead4b572c0df21b75050dd24a0..1dd915b5969810ad738a48026b6ef11d826112e7 100644 (file)
@@ -357,11 +357,21 @@ extern int emacs_setenv_TZ (char const *);
 # define FLEXIBLE_ARRAY_MEMBER
 #endif
 
-/* Use CODE only if lint checking is in effect.  */
+/* When used in place of 'volatile', 'NONVOLATILE' is equivalent to nothing,
+   except it cajoles GCC into not warning incorrectly that a variable needs to
+   be volatile.  This works around GCC bug 54561.  */
 #if defined GCC_LINT || defined lint
-# define IF_LINT(Code) Code
+# define NONVOLATILE volatile
 #else
-# define IF_LINT(Code) /* empty */
+# define NONVOLATILE /* empty */
+#endif
+
+/* 'int x UNINIT;' is equivalent to 'int x;', except it cajoles GCC
+   into not warning incorrectly about use of an uninitialized variable.  */
+#if defined GCC_LINT || defined lint
+# define UNINIT = {0,}
+#else
+# define UNINIT /* empty */
 #endif
 
 /* conf_post.h ends here */