]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR pch/13676 (GCC failes to recognize files ending in .hpp as headers to be precom...
authorAlfred Minarik <a.minarik@aon.at>
Mon, 6 Aug 2007 11:10:19 +0000 (13:10 +0200)
committerGerald Pfeifer <gerald@gcc.gnu.org>
Mon, 6 Aug 2007 11:10:19 +0000 (11:10 +0000)
PR pch/13676
* doc/invoke.texi: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.

cp:
* lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
* g++spec.c (lang_specific_driver): Check them.

From-SVN: r127239

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

index 256381b6738d711f034e77337199070f965823b0..62005cf0ce07cf002caac749fdb50da367dea16c 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-06  Alfred Minarik  <a.minarik@aon.at>
+
+       PR pch/13676
+       * doc/invoke.texi: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
+
 2008-08-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR middle-end/32988
index 468612de5f8a9b48ab68a29717b7d9dce1eaf6c7..eef4d12066e17b5ef4dc43bebb12e08d09a653dc 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-04  Alfred Minarik  <a.minarik@aon.at>
+
+       PR pch/13676
+       * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
+       * g++spec.c (lang_specific_driver): Check them.
+
 2007-08-06  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/19532
index 0686de4f89b46d443469c5a5434ea9b98a7ade6b..a19a35fa34840793cd7fafaca50b0f7f06243dd0 100644 (file)
@@ -235,6 +235,12 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
            {
              if ((len <= 2 || strcmp (argv[i] + (len - 2), ".H") != 0)
                  && (len <= 2 || strcmp (argv[i] + (len - 2), ".h") != 0)
+                 && (len <= 4 || strcmp (argv[i] + (len - 4), ".hpp") != 0)
+                 && (len <= 3 || strcmp (argv[i] + (len - 3), ".hp") != 0)
+                 && (len <= 4 || strcmp (argv[i] + (len - 4), ".hxx") != 0)
+                 && (len <= 4 || strcmp (argv[i] + (len - 4), ".h++") != 0)
+                 && (len <= 4 || strcmp (argv[i] + (len - 4), ".HPP") != 0)
+                 && (len <= 4 || strcmp (argv[i] + (len - 4), ".tcc") != 0)
                  && (len <= 3 || strcmp (argv[i] + (len - 3), ".hh") != 0))
                library = 1;
            }
index 7be145d5072de0b071570868fc8d72cb1e2d60af..54d69a115faa162f08b9a0db34c72981ca48ac99 100644 (file)
@@ -33,6 +33,12 @@ along with GCC; see the file COPYING3.  If not see
   {".C",   "@c++", 0, 0, 0},
   {".CPP", "@c++", 0, 0, 0},
   {".H",   "@c++-header", 0, 0, 0},
+  {".hpp", "@c++-header", 0, 0, 0},
+  {".hp",  "@c++-header", 0, 0, 0},
+  {".hxx", "@c++-header", 0, 0, 0},
+  {".h++", "@c++-header", 0, 0, 0},
+  {".HPP", "@c++-header", 0, 0, 0},
+  {".tcc", "@c++-header", 0, 0, 0},
   {".hh",  "@c++-header", 0, 0, 0},
   {"@c++-header",
     "%{E|M|MM:cc1plus -E %(cpp_options) %2 %(cpp_debug_options)}\
index 5a13c42501b29f09edecc047823c55f748aeacdf..233dad3b793355f55888a0724c4185258bfa22bc 100644 (file)
@@ -913,6 +913,12 @@ Objective-C++ source code which should not be preprocessed.
 
 @item @var{file}.hh
 @itemx @var{file}.H
+@itemx @var{file}.hp
+@itemx @var{file}.hxx
+@itemx @var{file}.hpp
+@itemx @var{file}.HPP
+@itemx @var{file}.h++
+@itemx @var{file}.tcc
 C++ header file to be turned into a precompiled header.
 
 @item @var{file}.f
@@ -1240,7 +1246,8 @@ Display the version number and copyrights of the invoked GCC@.
 @cindex C++ source file suffixes
 C++ source files conventionally use one of the suffixes @samp{.C},
 @samp{.cc}, @samp{.cpp}, @samp{.CPP}, @samp{.c++}, @samp{.cp}, or
-@samp{.cxx}; C++ header files often use @samp{.hh} or @samp{.H}; and
+@samp{.cxx}; C++ header files often use @samp{.hh}, @samp{.hpp},
+@samp{.H}, or (for shared template code) @samp{.tcc}; and
 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