This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
doc fixups for g++
- From: Mike Stump <mrs at apple dot com>
- To: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Jun 2006 11:49:33 -0700
- Subject: doc fixups for g++
This enhances the documentation for g++ to better match what it
really does now-a-days. Notable changes are:
We don't imply an argument of foo is treated as C++, cause it's not
We don't imply foo.f is treated as C++, cause it's not
We explain just what files are treated as C++
Any objections?
mrs $ cat ~/diffs/doc-1.diffs.txt
2006-06-30 Mike Stump <mrs@apple.com>
* doc/invoke.texi (Invoking G++): Clarify prose for g++.
Doing diffs in doc:
--- doc/invoke.texi.~1~ 2006-06-29 13:02:17.000000000 -0700
+++ doc/invoke.texi 2006-06-30 11:40:55.000000000 -0700
@@ -1089,15 +1089,13 @@ with the name @command{gcc}).
@findex g++
@findex c++
-However, C++ programs often require class libraries as well as a
-compiler that understands the C++ language---and under some
-circumstances, you might want to compile programs or header files from
-standard input, or otherwise without a suffix that flags them as C++
-programs. You might also like to precompile a C header file with a
-@samp{.h} extension to be used in C++ compilations. @command{g++} is a
-program that calls GCC with the default language set to C++, and
-automatically specifies linking against the C++ library. On many
-systems, @command{g++} is also installed with the name @command{c++}.
+However, the use of @command{gcc} does not add the C++ library.
+@command{g++} is a program that calls GCC and treats @samp{.c},
+@samp{.h} and @samp{.i} files as C++ source files instead of C source
+files, and automatically specifies linking against the C++ library.
+This is also useful when precompiling a C header file with a @samp{.h}
+extension for use in C++ compilations. On many systems, @command{g++}
+is also installed with the name @command{c++}.
@cindex invoking @command{g++}
When you compile C++ programs, you may specify many of the same
--------------