From: david@coent.demon.co.uk (David Coe)
Subject: Re: B17: Compiler-Error
11 Dec 1996 00:22:05 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <32ADD7B7.520A.cygnus.gnu-win32@coent.demon.co.uk>
References: <Pine.LNX.3.93.961210190155.2511A-100000@relay.usart.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (WinNT; I)
Original-To: Max Gotlib <max@cca.usart.ru>
Original-CC: gnu-win32@cygnus.com, db@med-in.uni-sb.de
Original-Sender: owner-gnu-win32@cygnus.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@cygnus.com" with one line of text: "help".
