This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cygwin warning elimination: gcc.c:3480: warning: suggest parentheses ...


Eliminate a couple more warnings in gcc.c for cygwin and other platforms
that define HAVE_EXECUTABLE_SUFFIX.  Bootstrapped on 3.0 branch on
i386-pc-cygwin.

/usr/local/src/gcc/gcc/gcc.c: In function `process_command':
/usr/local/src/gcc/gcc/gcc.c:3480: warning: suggest parentheses around
assignment used as truth value
/usr/local/src/gcc/gcc/gcc.c:3482: warning: suggest parentheses around
assignment used as truth value
fixed by adding parentheses

2001-04-10  David Billinghurst  <David.Billinghurst@riotinto.org>

	* gcc.c (process_command) Add parentheses to eliminate two warnings

--- gcc.c.orig	Mon Apr  9 22:11:22 2001
+++ gcc.c	Mon Apr  9 22:26:03 2001
@@ -3477,9 +3480,9 @@
 			      have_c = 1;
 			      break;
 			    }
-			  else if (skip = SWITCH_TAKES_ARG (argv[j][1]))
+			  else if ( (skip = SWITCH_TAKES_ARG (argv[j][1])) )
 			    j += skip - (argv[j][2] != 0);
-			  else if (skip = WORD_SWITCH_TAKES_ARG (argv[j] +
1))
+			  else if ( (skip = WORD_SWITCH_TAKES_ARG (argv[j] +
1)) )
 			    j += skip;
 			}
 		      j++;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]