public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu>, gcc@gcc.gnu.org
Subject: Re: Call for testers: MPC 0.7 prerelease tarball
Date: Tue, 01 Sep 2009 11:05:00 -0000	[thread overview]
Message-ID: <4A9D0344.7000101@gmail.com> (raw)
In-Reply-To: <4A9D0246.7060904@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Dave Korn wrote:

>   Fell at the first hurdle for me:
> 
>  gcc-4 -shared-libgcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -p
> edantic -Wall -Wextra -Werror -O2 -pipe -MT inp_str.lo -MD -MP -MF .deps/inp_str
> .Tpo -c inp_str.c  -DDLL_EXPORT -DPIC -o .libs/inp_str.o
> cc1: warnings being treated as errors
> inp_str.c: In function 'extract_string':
> inp_str.c:113:10: error: array subscript has type 'char'
> inp_str.c:114:10: error: array subscript has type 'char'
> inp_str.c:115:10: error: array subscript has type 'char'
> inp_str.c:118:13: error: array subscript has type 'char'
> inp_str.c:119:13: error: array subscript has type 'char'
> inp_str.c:120:13: error: array subscript has type 'char'
> make[2]: *** [inp_str.lo] Error 1
> make[2]: *** Waiting for unfinished jobs....


  Attached allowed it to build, and seems to be what the function was already
doing for isspace earlier.  Test results will follow.

    cheers,
      DaveK

[-- Attachment #2: inp_str_c_fix.diff --]
[-- Type: text/x-c, Size: 952 bytes --]

--- orig/mpc-0.7-dev/src/inp_str.c	2009-08-26 21:24:41.000000000 +0100
+++ mpc-0.7-dev/src/inp_str.c	2009-09-01 12:17:04.546875000 +0100
@@ -110,14 +110,14 @@ extract_string (FILE *stream)
 
     /* (n-char-sequence) only after a NaN */
     if ((nread != 3
-         || tolower (str[0]) != 'n'
-         || tolower (str[1]) != 'a'
-         || tolower (str[2]) != 'n')
+         || tolower ((unsigned char) str[0]) != 'n'
+         || tolower ((unsigned char) str[1]) != 'a'
+         || tolower ((unsigned char) str[2]) != 'n')
         && (nread != 5
             || str[0] != '@'
-            || tolower (str[1]) != 'n'
-            || tolower (str[2]) != 'a'
-            || tolower (str[3]) != 'n'
+            || tolower ((unsigned char) str[1]) != 'n'
+            || tolower ((unsigned char) str[2]) != 'a'
+            || tolower ((unsigned char) str[3]) != 'n'
             || str[4] != '@')) {
       ungetc (c, stream);
       return str;

  reply	other threads:[~2009-09-01 11:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  1:04 Kaveh R. GHAZI
2009-09-01 11:01 ` Dave Korn
2009-09-01 11:05   ` Dave Korn [this message]
2009-09-01 11:24     ` Dave Korn
2009-09-04 14:06       ` Kaveh R. Ghazi
2009-09-04 22:26         ` Weddington, Eric
2009-09-05  5:57         ` Ryan Hill
2009-09-04 17:25 ` David Fang
2009-09-04 14:40 Uros Bizjak
2009-09-04 16:24 Loren James Rittle
2009-09-04 17:03 Dominique Dhumieres

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9D0344.7000101@gmail.com \
    --to=dave.korn.cygwin@googlemail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=ghazi@caip.rutgers.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).