diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-08 10:33:34 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-06-08 11:50:42 -0700 |
commit | 82f49c6a373f981a778f4d939ca2d47c031e0659 (patch) | |
tree | e84afa8e7af336f15f37789fbf23f4ec62905790 /src/conf_post.h | |
parent | 7715ee54b3588cfdef03b5d45aaf44b73b422ec6 (diff) | |
download | emacs-82f49c6a373f981a778f4d939ca2d47c031e0659.tar.gz |
Replace IF_LINT by NONVOLATILE and UNINIT
Inspired by a suggestion from RMS in: http://bugs.gnu.org/23640#58
* .dir-locals.el (c-mode): Adjust to macro changes.
* src/conf_post.h (NONVOLATILE, UNINIT): New macros (Bug#23640).
(IF_LINT): Remove. All uses replaced by the new macros.
Diffstat (limited to 'src/conf_post.h')
-rw-r--r-- | src/conf_post.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/conf_post.h b/src/conf_post.h index 762aa7727fd..1dd915b5969 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -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 */ |