On Dec 13, 2013, at 2:36 AM, Juhász Ádám <jad...@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

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to