🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ch.comp.os.linux
Article #18104

Re: gnu c Compiler Problem

#18104
From: Marc SCHAEFER
Date: Sun, 16 Apr 2000 00:00
30 lines
1682 bytes
dz <zupp_XinXger@freXe_surfX.ch> wrote:
> : Der Compiler gcc akzeptiert den Backslash in Marcros nicht. Gem�ss

Of course it does.

#define SOMETHING abcd \
truc \
last line here

However, the standard explicitely prohibits anything after the \.

The error you get is probably:

   schaefer@defian:/tmp% gcc truc.c
   truc.c:2: stray '\' in program
   truc.c:3: parse error before `last'

Your problem is that your lines do not finish at the \, since your
MS-* format text files have a ^M at the end. This is non standard
and won't work. You must first remove all the ^M from all the
files. End of line is LF (linefeed, ^J), nothing else.

(BTW: on UNIX, opening a file with stdio's fopen with "r" or with "rb"
 is equivalent, as is with "w" and "wb". This is a known problem
 when porting from UNIX to MS-*. The MS-* native compilers MUST
 now the file is "b"inary so that they don't remove the ^Ms.
 Yes, the MS-* native compilers, when processing text files,
 are *obliged* to remove the final ^M for C-standard
 conformance. This is only one of the numerous MS-* environment
 annoyances when attempting to use standards.)
Technical Details
Message-ID: <8dblsu$ht3$1@vulcan.alphanet.ch>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8dagtk$mac$1@hs1b01h02-0.dplanet.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f4b73,936da979a726e211
X-Google-Attributes: gidf4b73,public
From: Marc SCHAEFER <schaefer@alphanet.ch>
Subject: Re: gnu c Compiler Problem
Date: 2000/04/16
Message-ID: <8dblsu$ht3$1@vulcan.alphanet.ch>
X-Deja-AN: 611769963
Content-Transfer-Encoding: 8bit
References: <8dagtk$mac$1@hs1b01h02-0.dplanet.ch>
Organization: ALPHANET NF -- Not for profit telecom research
Content-Type: text/plain; charset=ISO-8859-1
Mime-Version: 1.0
Newsgroups: ch.comp.os.linux