delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/01/11:09:45

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <200008011448.IAA07345@chorus>
Date: Tue, 1 Aug 2000 08:48:14 -0600 (MDT)
From: "13mb80000-HallM(10053584)37x10" <marcus AT bighorn DOT dr DOT lucent DOT com>
Reply-To: "13mb80000-HallM(10053584)37x10" <marcus AT bighorn DOT dr DOT lucent DOT com>
Subject: Re: Cygwin 1.1.3-1 (g++) parser not sure how to deal with continuation '\'
To: cygwin AT sourceware DOT cygnus DOT com, pgarceau AT teleport DOT com
X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4m sparc
X-Sun-Text-Type: ascii

> Hi folks,
> 
> Ok...looked through the archives and couldn't find any reference 
> to this error.
> 
> info:
> 	This is NT4 box.
> 	Used latest setup.exe to install/update to 1.1.3-1
> 
>   From cygcheck -s:
> 	MAKE_MODE="unix"
> 	d:\cygwin\bin  /usr/bin  user    binmode
> 	d:\cygwin\lib  /usr/lib  user    binmode
> 	d:\cygwin  /        user    binmode
> 
> Apparent error:
> 
> 	header file is being parsed incorrectly by g++.
> 
> Error Reproducible?
> 	Yes, this is reproducible.
> 
> 	When g++ detects '\' in a header file, it is unable to parse it 
> except as "stray '\' in program".
> 
> 	When '\' removed from header, the problem disappears.
> 
>    Example:
> 
> a) 
> #define D3DRGB(r, g, b) \
> 	(0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) 
| (long)((b) * 255))
> 
> 	fails ("stray '\' in program").
> 
> b)
> #define D3DRGB(r, g, b) (0xff000000L | ( ((long)((r) * 255)) << 16) | 
(((long)((g) * 255)) << 8) | (long)((b) * 255))
>       
> 	works.
> 

Almost certainly the backslash is followed by a <CR> character before the
<LF> character.  Since you are reading the file in binary mode, cygwin
does not change <CR><LF> into \n, so the backslash does not occur at the
end of the line (it's got a whitespace character following it).  If you
get rid of the <CR>s at the end of the lines, it should work correctly.

marcus

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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