From 63b08b6060e882428b1a7214ab40cdfb3d65c025 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 5 Jul 2006 22:17:28 +0000 Subject: [PATCH] * doc/invoke.texi (Invoking G++): Clarify prose for g++. From-SVN: r115211 --- gcc/ChangeLog | 4 ++++ gcc/doc/invoke.texi | 17 ++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b91fd74bc459..6a4d377bd4f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2006-07-05 Mike Stump + + * doc/invoke.texi (Invoking G++): Clarify prose for g++. + 2006-07-05 H.J. Lu PR target/26146 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0c5e382f8518..a4896a5bc9b9 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1089,15 +1089,14 @@ 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 unless @option{-x} is used, 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