From: pavenis AT lanet DOT lv To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Thu, 9 Mar 2000 17:54:40 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: bug in gcc2952 Message-ID: <38C7E560.8538.CD4348@localhost> References: <4F3174B207F AT HRZ1 DOT hrz DOT tu-darmstadt DOT de> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com On 5 Mar 2000, at 10:13, Eli Zaretskii wrote: > > 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 "/"? > Perhaps it's Ok as gcc is looking whether tooldir_prefix is not an absolute path there (relative and absolute tooldir_prefixes are handled slightly differently). We should not treat d:foo or d: as absolute. Maybe only I should add 'isalpha(tooldir_prefix[0])' in condition... Andris