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

Davor Cubranic cubranic at stat.ubc.ca
Fri Dec 13 16:05:30 PST 2013


On Dec 13, 2013, at 2:36 AM, Juhász Ádám <jadaml at gmail.com> wrote:
> 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.
> 
This is utterly wrong: look at cpp’s man page, it’s a C *pre-processor*. It does no compilation whatsoever. Its sole function is to process the “#…” directives, such as splicing the "#include”-d headers into the source file, removing parts of the source in the wrong arm of an “#ifdef”, or expanding "#define”-d macros. 
> 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.
> 
Not at all. Cpp is used automatically by the C compiler to deal with macros in the source file. It’s not intended to call the compiler itself, much less smart enough to choose the right compiler for the language.

Davor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20131213/423e91df/attachment.html>


More information about the macports-users mailing list