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

Message-ID: <33B4CBA2.40D6@lausd.k12.ca.us>
Date: Sat, 28 Jun 1997 01:30:27 -0700
From: csantill <csantill AT lausd DOT k12 DOT ca DOT us>
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Newbie for loop/data type problem

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
that matter).  When I change the RHIDE flag option so that GCC compiles
chars as unsigned bytes I lose a *warning* about something like "data
type limitation".  But, w/the unsigned char flag on, I get an infinite
loop(this pisses me off because I call this function from another
function).  If anybody has a work around (while loop, a mix of C wrapped
in an inline ASM loop) or any other help would be great;

Here's a vague description of my code:

void stupid_error(char get_some_stupid_vars)
{

  char c;

  for(c=0;c<=255;c++)
  {
    /* do some stupid newbie stuff */
  }

}

- Raw text -


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