This is the mail archive of the gcc-bugs@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]

Re: latest cppexp.c cannot bootstrap on sunos4, uses unary plus operator


On Sun, Jul 09, 2000 at 02:36:02PM -0400, Kaveh R. Ghazi wrote:
> Zack,
> 
> The latest CVS dies on SunOS4 again.  This time its the use of the
> ANSI C unary plus operator in cppexp.c:
> 
>  > cc -c -DIN_GCC -g -DHAVE_CONFIG_H -I. -I../../egcs-CVS20000709/gcc
>  > 	-I../../egcs-CVS20000709/gcc/config
>  > 	-I../../egcs-CVS20000709/gcc/../include
>  > 	../../egcs-CVS20000709/gcc/cppexp.c
>  > "../../egcs-CVS20000709/gcc/cppexp.c", line 845: syntax error at or
>  > 		near symbol +

Please try this patch.

zw

===================================================================
Index: cppexp.c
--- cppexp.c	2000/07/08 19:00:37	1.64
+++ cppexp.c	2000/07/09 19:16:21
@@ -842,7 +842,7 @@ _cpp_parse_expr (pfile)
 	    case CPP_PLUS:
 	      if (!(top->flags & HAVE_VALUE))
 		{
-		  UNARY(+);
+		  UNARY(/* + */);	/* K+R C doesn't like unary + */
 		}
 	      else
 		{

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