This was approved for 3.4 BIB branch.
authorDevang Patel <dpatel@apple.com>
Thu, 19 Dec 2002 20:34:43 +0000 (12:34 -0800)
committerDevang Patel <dpatel@gcc.gnu.org>
Thu, 19 Dec 2002 20:34:43 +0000 (12:34 -0800)
This was approved for 3.4 BIB branch. But since it is dead now, I am putting
this in mainline sources.

2002-12-19  Devang Patel  <dpatel@apple.com>
      * gcc.c (struct default_compiler): Recognizes input file name with
      .CPP extension as C++ source files
      * cp/lang-spec.h: Same
      * doc/invoke.texi:  Add documentation for .CPP support.

From-SVN: r60330

gcc/ChangeLog
gcc/cp/lang-specs.h
gcc/doc/invoke.texi
gcc/gcc.c

index 4987ae71e91010870a65b919f2e2fe934cd11ba7..51f11f5287a2c48a8a6b552322fcfc13f71541c1 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-19  Devang Patel  <dpatel@apple.com>
+       * gcc.c (struct default_compiler): Recognizes input file name with
+       .CPP extension as C++ source files
+       * cp/lang-spec.h: Same
+       * doc/invoke.texi:  Add documentation for .CPP support.
+       
 2002-12-19  Aldy Hernandez  <aldyh@redhat.com>
 
        PR 8553
index 2e9640c83e1e5926d7d93aaa269aa5fbb9de0df2..15af3d04b27e6ea54e41a48b9b06fe1200b1a200 100644 (file)
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA.  */
   {".cpp", "@c++", 0},
   {".c++", "@c++", 0},
   {".C",   "@c++", 0},
+  {".CPP", "@c++", 0},
   {"@c++",
     "%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
        %(cpp_options) %2 %(cpp_debug_options)}\
index baab4a9febab6620d57f85c6c948252f2034ade9..f800c1e7dca991a14e97d97fc6186bd94109f1c7 100644 (file)
@@ -792,6 +792,7 @@ C header file (not to be compiled or linked).
 @itemx @var{file}.cp
 @itemx @var{file}.cxx
 @itemx @var{file}.cpp
+@itemx @var{file}.CPP
 @itemx @var{file}.c++
 @itemx @var{file}.C
 C++ source code which must be preprocessed.  Note that in @samp{.cxx},
@@ -983,7 +984,7 @@ Display the version number and copyrights of the invoked GCC.
 @cindex suffixes for C++ source
 @cindex C++ source file suffixes
 C++ source files conventionally use one of the suffixes @samp{.C},
-@samp{.cc}, @samp{.cpp}, @samp{.c++}, @samp{.cp}, or @samp{.cxx};
+@samp{.cc}, @samp{.cpp}, @samp{.CPP}, @samp{.c++}, @samp{.cp}, or @samp{.cxx};
 preprocessed C++ files use the suffix @samp{.ii}.  GCC recognizes
 files with these names and compiles them as C++ programs even if you
 call the compiler the same way as for compiling C programs (usually with
index 85f792b678616ed051593e23008f71e0fe26e15e..618d2723208d22b14258c2fb5c5bc725372dccb0 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -886,7 +886,7 @@ static const struct compiler default_compilers[] =
   {".m",  "#Objective-C", 0}, {".mi",  "#Objective-C", 0},
   {".cc", "#C++", 0}, {".cxx", "#C++", 0}, {".cpp", "#C++", 0},
   {".cp", "#C++", 0}, {".c++", "#C++", 0}, {".C", "#C++", 0},
-  {".ii", "#C++", 0},
+  {".CPP", "#C++", 0}, {".ii", "#C++", 0},
   {".ads", "#Ada", 0}, {".adb", "#Ada", 0},
   {".f", "#Fortran", 0}, {".for", "#Fortran", 0}, {".fpp", "#Fortran", 0},
   {".F", "#Fortran", 0}, {".FOR", "#Fortran", 0}, {".FPP", "#Fortran", 0},