[committed] Fix NetBSD libgomp bootstrap error.

Krister Walfridsson krister.walfridsson@gmail.com
Sun Jun 29 21:55:00 GMT 2008


libgomp breaks bootstrap on NetBSD because of
   cc1: warnings being treated as errors
   ../../../gcc/libgomp/env.c: In function 'parse_stacksize':
   ../../../gcc/libgomp/env.c:207: error: array subscript has type 'char'
   ../../../gcc/libgomp/env.c: In function 'parse_spincount':
   ../../../gcc/libgomp/env.c:276: error: array subscript has type 'char'

I have committed the attached patch under the obvious rule.

Bootstrapped and tested on x86_64-unknown-netbsd4.0 and
i386-unknown-netbsdelf3.1.

    /Krister


2008-06-29  Krister Walfridsson  <krister.walfridsson@gmail.com>

 	* env.c (parse_stacksize): Add cast to avoid warning.
 	(parse_spincount): Likewise.
-------------- next part --------------
Index: libgomp/env.c
===================================================================
--- libgomp/env.c	(revision 137259)
+++ libgomp/env.c	(working copy)
@@ -207,7 +207,7 @@ parse_stacksize (const char *name, unsig
     ++end;
   if (*end != '\0')
     {
-      switch (tolower (*end))
+      switch (tolower ((unsigned char) *end))
 	{
 	case 'b':
 	  shift = 0;
@@ -276,7 +276,7 @@ parse_spincount (const char *name, unsig
     ++end;
   if (*end != '\0')
     {
-      switch (tolower (*end))
+      switch (tolower ((unsigned char) *end))
 	{
 	case 'k':
 	  mult = 1000LL;


More information about the Gcc-patches mailing list