www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/13/02:38:30

Date: Tue, 13 Aug 1996 09:30:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "John M. Aldrich" <fighteer AT cs DOT com>
Cc: White <whitesr AT freenet DOT tlh DOT fl DOT us>, djgpp AT delorie DOT com
Subject: Re: Parse Errors! Argh! help me please
In-Reply-To: <320FF7D2.3F0@cs.com>
Message-Id: <Pine.SUN.3.91.960813092543.28748S-100000@is>
Mime-Version: 1.0

On Mon, 12 Aug 1996, John M. Aldrich wrote:

> White wrote:
> > 
> > I keep getting these code parsing errors when i try to compile a old
> > game i wrote for MS visual C 1.0. I think it has something to do with
> > the comment lines, but i cant seem to fix it.
> > I use comments like this ---->     //comments here
> > I think it supports only this king---->   /*comments here*/
> 
> MS Visual C allows C++ style comments in C code, whereas DJGPP does not. 
> There is a utility available to convert the comments to C-style, but I
> don't remember the location off-hand.  Barring that, you can either change
> the comment style yourself or compile your program as a C++ program.

That is incorrect.  GCC 2.7.0 and later also supports C++-style comments 
in a C program.  If the version of GCC that's used is earlier (DJGPP v2.0 
comes with GCC 2.7.2), then there is a switch to GCC you can use to make 
it support C++-style comments, like so:

       gcc -c -Wp,-lang-c-c++-comments myprog.c

For more details on this, read section 8.3 of the DJGPP FAQ list 
(available as v2/faq201b.zip from the same place you get DJGPP).

- Raw text -


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