www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/24/21:54:49

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: trouble compiling c++
Date: Tue, 24 Jun 1997 11:18:47 -0700
Organization: Alcyone Systems
Lines: 21
Message-ID: <33B00F87.578D1DA7@alcyone.com>
References: <199706241043 DOT KAA12868 AT mx2 DOT rmplc DOT co DOT uk>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Liam wrote:

> Can't it tell the difference between C and C++ code
> with out relying on the extension of a file?

Some compilers do this, but they tend to be more trouble than they're
worth.  Some of them even have options to _always_ compile as C++, which
generates even bigger problems, as C++ is _not_ a proper superset of C.

If you don't want to use a C++ extension (.cc, .cpp), then you can use the
-x command line parameter to explicitly choose the language.  However,
this seems an awfully strange thing to want to do, especially since it's
not as if using the above extensions to mean C++ source files is unusual.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
     "Covenants without the sword / are but words."
                                 / Camden

- Raw text -


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