dpatel 02/09/17 15:05:01
Modified: gcc gcc.c
gcc/cp lang-specs.h
gcc/doc invoke.texi
Log:
Bug #: 3019010 .CPP extension claimed as linker input instead of C++
Now compiler recognizes .CPP as C++ extension.
Submitted by: Christian Molick
Reviewed by: Zem Laski
Revision Changes Path
1.144 +5 -3 gcc3/gcc/gcc.c
Index: gcc.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/gcc.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -r1.143 -r1.144
--- gcc.c 2002/09/17 21:43:14 1.143
+++ gcc.c 2002/09/17 22:04:50 1.144
@@ -985,7 +985,9 @@
{".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},
+ /* APPLE LOCAL .CPP extension */
+ /* FSF Candidate - Submitted */
+ {".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},
@@ -5177,7 +5179,7 @@
temp_filename_length + 1);
obstack_grow (&obstack, temp_filename,
temp_filename_length);
- /* APPLE LOCAL what is this for? */
+ /* APPLE LOCAL */
delete_this_arg = 0;
arg_going = 1;
break;
@@ -5222,7 +5224,7 @@
free (saved_suffix);
obstack_grow (&obstack, t->filename, t->filename_length);
- /* APPLE LOCAL what is this for? */
+ /* APPLE LOCAL */
delete_this_arg = (save_temps_flag == 0);
}
arg_going = 1;
1.26 +3 -0 gcc3/gcc/cp/lang-specs.h
Index: lang-specs.h
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/cp/lang-specs.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- lang-specs.h 2002/08/26 20:08:08 1.25
+++ lang-specs.h 2002/09/17 22:04:53 1.26
@@ -32,6 +32,9 @@
{".cpp", "@c++", 0},
{".c++", "@c++", 0},
{".C", "@c++", 0},
+ /* APPLE LOCAL .CPP extension */
+ /* FSF Candidate - Submitted */
+ {".CPP", "@c++", 0},
{"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */
1.41 +7 -5 gcc3/gcc/doc/invoke.texi
Index: invoke.texi
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/doc/invoke.texi,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- invoke.texi 2002/09/02 13:17:05 1.40
+++ invoke.texi 2002/09/17 22:04:55 1.41
@@ -1045,14 +1045,16 @@
@node Invoking G++
@section Compiling C++ Programs
+@c APPLE LOCAL .CPP extension
+@c FSF Candidate - Submitted
@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};
-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
-the name @command{gcc}).
+@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 the name @command{gcc}).
@findex g++
@findex c++