Date: Thu, 9 Mar 2000 18:06:21 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp-workers AT delorie DOT com Subject: Re: bug in gcc2952 In-Reply-To: <38C7E560.8538.CD4348@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On Thu, 9 Mar 2000 pavenis AT lanet DOT lv wrote: > > 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. In my experience, it is safer to treat "d:foo" as absolute, not as relative. In particular, if relative directories get prepended ./ or ../, then it will fail with d:foo. But I don't know if this is relevant to this case. > Maybe only I should add 'isalpha(tooldir_prefix[0])' in condition... Probably.