delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/05/04:08:07

Date: Sun, 5 Mar 2000 10:13:35 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Juan Manuel Guerrero <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
cc: djgpp-workers AT delorie DOT com
Subject: Re: bug in gcc2952
In-Reply-To: <4F3174B207F@HRZ1.hrz.tu-darmstadt.de>
Message-ID: <Pine.SUN.3.91.1000305101305.29735Z-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 4 Mar 2000, Juan Manuel Guerrero wrote:

> !   if (!IS_DIR_SEPARATOR (*tooldir_prefix)
> ! #ifdef HAVE_DOS_BASED_FILE_SYSTEM
> !         /* Check for disk name on MS-DOS-based systems. */
> !         && !(tooldir_prefix[1] == ':' && IS_DIR_SEPARATOR (tooldir_prefix[2]))
> ! #endif
> !      )

Is it correct to assume that the drive letter is always followed by a
slash/backslash in this case?  Can you have "d:foo" or just "d:", for
example?  (It's hard to say without seeing the context.)  If those are
possible, then the above test should be augmented.

For that matter, is it safe to look at tooldir_prefix[1] and
tooldir_prefix[2] without making sure that tooldir_prefix[] has enough
characters in it?  What if tooldir_prefix[] is simply "/"?

- Raw text -


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