public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: cpp w/DOS line feeds
@ 1999-12-09  1:37 Stuart Summerville (NEC)
  1999-12-09  8:13 ` Dave Brolley
  1999-12-31 23:54 ` Stuart Summerville (NEC)
  0 siblings, 2 replies; 28+ messages in thread
From: Stuart Summerville (NEC) @ 1999-12-09  1:37 UTC (permalink / raw)
  To: gcc

Hi all,

I'm currently contemplating the problem in gcc (or cpp in particular) of
multi-line macros that are not interpreted properly if the EOL is made up of
CRs as well as LFs. I've seen the informative thread from 21-Jan-99 about
this, with some bandied solutions, but nothing since then. Couldn't find
much in the gcc-bugs or gcc-announce lists either.

So, whats the current status on this issue? I'm currently running gcc
V2.91.57, & hope that 2.95.x contains the fix. Speaking of which, is the CPP
actually part of the gcc package? If not, where is it located? How does one
find out the version of their CPP tool?

Also, how does one search through web-based release notes between V2.91 and
V2.95 looking for such things?

Regards, sTu.
_________________________________________________________________________
Stuart Summerville                         NEC Australia Pty. Ltd.
ph: (+61 3) 9264-3090                      Integrated Comm Products (R&D)
fax:(+61 3) 9264-3841                      649-655 Springvale Road
e-mail: stuarts@icpdd.neca.nec.com.au      Mulgrave, VIC 3170, AUSTRALIA

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: cpp w/DOS line feeds
@ 1999-12-09  5:42 N8TM
  1999-12-09 21:28 ` Per Bothner
  1999-12-31 23:54 ` N8TM
  0 siblings, 2 replies; 28+ messages in thread
From: N8TM @ 1999-12-09  5:42 UTC (permalink / raw)
  To: stuarts, gcc

In a message dated 12/9/99 1:38:24 AM Pacific Standard Time, 
stuarts@icpdd.neca.nec.com.au writes:

> contemplating the problem in gcc (or cpp in particular) of
>  multi-line macros that are not interpreted properly if the EOL is made up 
of
>  CRs as well as LFs.
>hope that 2.95.x contains the fix

Don't hope too much.  As mentioned in the earlier discussion, cpp is intended 
to be able to use any character preceded by backslash to stand for that 
character taken literally, in the old unix tradition.

I just had an episode where source code containing \r compiled without 
complaints but didn't run identically when compiled under W2K and under 
linux.  Removing all the \r characters didn't change the results on Windows 
but corrected the variance in the linux version.  Maybe the 2.96 versions of 
the compiler are tolerant of \r when running on Windows but not otherwise.

The commercial compilers I have used work with source code without \r, but 
their run time may require text data files to contain \r.

Tim
tprince@computer.org

^ permalink raw reply	[flat|nested] 28+ messages in thread
* cpp w/DOS line feeds
@ 1999-01-21  4:56 Matthew Kirkwood
  1999-01-21  6:12 ` Matthias Urlichs
  1999-01-31 23:58 ` Matthew Kirkwood
  0 siblings, 2 replies; 28+ messages in thread
From: Matthew Kirkwood @ 1999-01-21  4:56 UTC (permalink / raw)
  To: egcs

Hi,

Is there a reason that cpp doesn't belive MSDOS line breaks?

I ask because twice this week I have had to 
	tr -d '\r'
files which were last edited in a DOS editor of some sort.

Almost everything works, except for multi-line #defines:

#define MULTI_LINE_THING(a,b)	( (a) > (b) ? \^M
				  (a) : (b))

cpp thinks that the \ is escaping the ^M (\r in polite
company).

Is there a reason or standard which mandates this?

Matthew.


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~1999-12-31 23:54 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-09  1:37 cpp w/DOS line feeds Stuart Summerville (NEC)
1999-12-09  8:13 ` Dave Brolley
1999-12-31 23:54   ` Dave Brolley
1999-12-31 23:54 ` Stuart Summerville (NEC)
  -- strict thread matches above, loose matches on Subject: below --
1999-12-09  5:42 N8TM
1999-12-09 21:28 ` Per Bothner
1999-12-31 23:54   ` Per Bothner
1999-12-31 23:54 ` N8TM
1999-01-21  4:56 Matthew Kirkwood
1999-01-21  6:12 ` Matthias Urlichs
1999-01-21  6:18   ` Matthew Kirkwood
1999-01-31 23:58     ` Matthew Kirkwood
1999-01-21  9:33   ` Per Bothner
1999-01-21 10:09     ` Joe Buck
1999-01-21 11:41       ` Zack Weinberg
1999-01-23  3:24         ` Matthias Urlichs
1999-01-23  8:22           ` Per Bothner
1999-01-23  8:46             ` Matthias Urlichs
1999-01-31 23:58               ` Matthias Urlichs
1999-01-31 23:58             ` Per Bothner
1999-01-31 23:58           ` Matthias Urlichs
1999-01-31 23:58         ` Zack Weinberg
1999-01-31 23:58       ` Joe Buck
1999-01-23  3:21     ` Matthias Urlichs
1999-01-31 23:58       ` Matthias Urlichs
1999-01-31 23:58     ` Per Bothner
1999-01-31 23:58   ` Matthias Urlichs
1999-01-31 23:58 ` Matthew Kirkwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).