delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/28/04:51:11

Date: Sat, 28 Jun 1997 16:45:27 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: csantill <csantill AT lausd DOT k12 DOT ca DOT us>
cc: djgpp AT delorie DOT com
Subject: Re: Newbie for loop/data type problem
In-Reply-To: <33B4CBA2.40D6@lausd.k12.ca.us>
Message-ID: <Pine.SGI.3.93.970628164253.6866A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

On Sat, 28 Jun 1997, csantill wrote:

> from: csantill AT lausd DOT k12 DOT ca DOT us
> 
> I'm having a problem w/a stupid for loop(or maybe I have newbie luck & I
> just found a bug in GCC v2.72).  Ok, I know chars are byte values, but
> they seemed to be signed in DJGPP (ANSI C dictates that they are
> unsigned; but then again, DJGPP isn't ANSI C or ANSI anything else for
[..]

AFAIK GCC is one of the most ANSI-compliant C compilers out there. If you
really want ANSI nitpicking compliance, try:

 gcc -Wall -pedantic -ansi 

As for your problem, why not just declare your counter variable as an
unsigned char? and oh yes, chars need not be byte values. I think 16-bit
chars are getting popular (the UNICODE set). Under NT chars are UNICODE I
think.

-----------------------------------------------------------------------
Orlando Alcantara Andico
WWW:   http://www2.mozcom.com/~orly/           Email:   orly AT mozcom DOT com
ICBM:  14 deg. 30' N, 120 deg. 59' E           POTS:    (+632) 932-2385

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019