How to make c++ realize empty character constant ''?

Brandon Allbery allbery.b at gmail.com
Fri Dec 13 17:32:37 PST 2013


On Fri, Dec 13, 2013 at 5:36 AM, Juhász Ádám <jadaml at gmail.com> wrote:

> However, the GNU compiler is also capable to select the proper language
> and use the proper tools for compillation, so GNU's cpp will compile… I
> believe Fortran, or even Java, if the proper alternative GNU compiler
> present. I've never used this capability this extremely though, and not
> aware wether other compilers are capable to do so.


No, what's actually happening is that `-traditional` is being passed; this
causes gcc and its cpp to behave like the old AT&T Portable C Compiler that
was available on older commercial Unix systems, so that it can compile
pre-ANSI (sometimes called "K&R") C code. PCC's cpp was a straight textual
substitution macro processor that did not understand the syntax of what it
was substituting; ANSI C compilers cannot use that kind of macro processor.

The -traditional option to gcc and its cpp exists only to support pre-ANSI
(K&R) C code. It happens to also be abusable (at least in its present form)
to work with non-C languages, but not even the gcc developers advise this
use. It is not reliable, it is not guaranteed to work with non-C code, and
it is not guaranteed to be available even in future versions of gcc (there
is not a lot of pre-ANSI C code around any more).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20131213/b33ba9c9/attachment.html>


More information about the macports-users mailing list