correctly test for __GNUC__ macro (non-GCC compilers do not have it defined at all)

This commit is contained in:
Ralf S. Engelschall 2009-06-01 11:02:09 +00:00
parent ac08b88250
commit 26286b8acf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193222
3 changed files with 4 additions and 4 deletions

View File

@ -594,7 +594,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
char *lastarg;
int realstatus;
int do_clearcmdentry;
#if __GNUC__
#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &argv;
(void) &argc;

View File

@ -898,7 +898,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
int oldstyle;
char const *prevsyntax; /* syntax before arithmetic */
int synentry;
#if __GNUC__
#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &out;
(void) &quotef;
@ -1323,7 +1323,7 @@ parsebackq: {
struct jmploc *volatile savehandler;
int savelen;
int saveprompt;
#if __GNUC__
#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &saveprompt;
#endif

View File

@ -195,7 +195,7 @@ setvarsafe(char *name, char *val, int flags)
struct jmploc jmploc;
struct jmploc *volatile savehandler = handler;
int err = 0;
#if __GNUC__
#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &err;
#endif