y***@gmail.com
2006-08-26 05:40:40 UTC
Hello, everyone,
The difference between gcc and g++ puzzles me. Here "gcc" referes to
the
"gcc" command , not the GNU Compiler Collection.
According to my study, "gcc" invoks cc1plus under /usr/libexec/gcc/ ,
and "g++" invokes cc1plus under /usr/libexec/gcc/. As C is a subset of
C++, why we cannot use g++ alone to compile all C/C++ programs.
Why we still need a "gcc" sitting aside?
Can anyone explain briefly to me? Thanks!
-Andy
The difference between gcc and g++ puzzles me. Here "gcc" referes to
the
"gcc" command , not the GNU Compiler Collection.
According to my study, "gcc" invoks cc1plus under /usr/libexec/gcc/ ,
and "g++" invokes cc1plus under /usr/libexec/gcc/. As C is a subset of
C++, why we cannot use g++ alone to compile all C/C++ programs.
Why we still need a "gcc" sitting aside?
Can anyone explain briefly to me? Thanks!
-Andy