delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/12/17:48:57

Date: Sat, 12 Jun 1999 23:48:25 +0200 (METDST)
Message-Id: <199906122148.XAA03072@tyr.diku.dk>
From: Morten Welinder <terra AT diku DOT dk>
To: djgpp-workers AT delorie DOT com
Subject: strtol
Reply-To: djgpp-workers AT delorie DOT com

Eli quoted me as saying "mixing signed and unsigned int's is looking
for trouble".  It sure sounds like something I might have said.

Case in question: strtol.

As far as I can tell, in src/libc/ansi/stdlib/strtol.c, strtol is
sending signed chars to isspace, isupper, and isdigit.  The effect of
that is undefined.

(I decided to look because Solaris gets it wrong.  "1\243" leads
to 2^31-1, not 1.  Sometimes.)

Morten
(Yep, still here.)

- Raw text -


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