delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/11/00:22:05

From: david AT coent DOT demon DOT co DOT uk (David Coe)
Subject: Re: B17: Compiler-Error
11 Dec 1996 00:22:05 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <32ADD7B7.520A.cygnus.gnu-win32@coent.demon.co.uk>
References: <Pine DOT LNX DOT 3 DOT 93 DOT 961210190155 DOT 2511A-100000 AT relay DOT usart DOT ru>
Mime-Version: 1.0
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Original-To: Max Gotlib <max AT cca DOT usart DOT ru>
Original-CC: gnu-win32 AT cygnus DOT com, db AT med-in DOT uni-sb DOT de
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Max Gotlib wrote:
> 
>         It seems to me that compiler chosed non-proper string.h header file (it uses
> one designed for C and not for C++).
>         May be somebody will fix this bug, or point out how to withdraw with
> it (i'm afraid that it will not be usable to type
>   "c:/cygnus/include/.../string.h"
> instead of
>   <string.h>).
> 

I don't think the problem is in the function definition via compiler
choice of the c string.h or g++ String.h header. The construct:

        strch ( cwd, '\0' )[-1] != '/'

turns up in Groff both in libbib/index.cc and three times in grops/ps.cc
each time producing the "invalid types in int [int]" diagnostic. It
isn't a trick I'm familiar with, but if it means something like:

        cwd[ strch (cwd, '\0' ) - 1] != '/'

testing for a / at the end of the character string, then replacing the
four occurences by the second form gets Groff compiled and running (at
least so far -:). I can't find the first form of back-stepping a pointer
to a string inside a function in any of my "cookbooks". Is it legal?

Best wishes
-- 
Dr David Coe			     \=\
58 Fairlawn Drive, East Grinstead     \=\   Tel +44 1342 326860
West Sussex, RH19 1NT, United Kingdom  \=\  Fax +44 1342 316019
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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