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

Juhász Ádám jadaml at gmail.com
Fri Dec 13 02:36:33 PST 2013


The *GNU's* C++ compiler name is g++. Clang's C++ compiler name is clang++
for example. (Microsoft Visual C++'s compiler name is lc.exe.) ‘c++’
usually a symlink on the compiler the system primarly built with. (or
something like that.)

the cpp (as a command) usually used to compile C codes, and it is heavily
used by MacPorts (where the program was written in C) since MacPorts
compiles the ports from source right there, on your Mac. One could use c++
(or g++) instead of cpp for C.

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.

Xcode used to ship GNU's C++ compiler. Now it is only a symlink to clang++.
2013.12.13. 7:54 ezt írta ("Davor Cubranic" <cubranic at stat.ubc.ca>):

> C++ compiler's name is g++. Cpp is the macro preprocessor. (And what this
> has to do with MacPorts, I've no idea.)
>
> Davor
>
> > On Dec 9, 2013, at 9:25 AM, Gmail <yangzf01 at gmail.com> wrote:
> >
> > Hi Chris
> > Yes, it is fortran code. I am not sure why it uses CPP to compile it.
> From the compilation statement, Fortran code is converted to .b file and
> then to compile it. I am not sure why.
> >
> >
> >> On Dec 9, 2013, at 3:51 AM, Chris Jones <jonesc at hep.phy.cam.ac.uk>
> wrote:
> >>
> >>
> >>> If you're trying to make a C/C++ string, perhaps you want '\0'. But I
> >>> can't tell what language you are working with or what exactly you are
> >>> trying to accomplish.
> >>
> >> The code that was posted by the OP sure isn't C++... Been a while since
> I used it, but looks like fortran to me..
> >
> > Thank you
> > Bruce
> > _______________________________________________
> > macports-users mailing list
> > macports-users at lists.macosforge.org
> > https://lists.macosforge.org/mailman/listinfo/macports-users
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20131213/65c60a0e/attachment.html>


More information about the macports-users mailing list