public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [C++ PATCH] PR13676 resubmission: Detect additional file extensions as C++ headers
@ 2007-07-27 15:56 Ian Lance Taylor
  2007-07-27 22:34 ` Gerald Pfeifer
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2007-07-27 15:56 UTC (permalink / raw)
  To: alfred.minarik; +Cc: gcc-patches, tromey

This patch:

http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00331.html

is OK for mainline.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [C++ PATCH] PR13676 resubmission: Detect additional file extensions  as C++ headers
  2007-07-27 15:56 [C++ PATCH] PR13676 resubmission: Detect additional file extensions as C++ headers Ian Lance Taylor
@ 2007-07-27 22:34 ` Gerald Pfeifer
  2007-07-29  5:47   ` AW: " Alfred Minarik
  0 siblings, 1 reply; 5+ messages in thread
From: Gerald Pfeifer @ 2007-07-27 22:34 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: alfred.minarik, gcc-patches, Tom Tromey

On Fri, 27 Jul 2007, Ian Lance Taylor wrote:
> This patch:
> 
> http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00331.html
> 
> is OK for mainline.

I believe Alfred does not have SVN write access.

Alfred, if you send me a patch tested against current SVN, I will be
happy to apply it for you.

Gerald

^ permalink raw reply	[flat|nested] 5+ messages in thread

* AW: [C++ PATCH] PR13676 resubmission: Detect additional file extensions as C++ headers
  2007-07-27 22:34 ` Gerald Pfeifer
@ 2007-07-29  5:47   ` Alfred Minarik
  2007-08-06 11:11     ` Gerald Pfeifer
  0 siblings, 1 reply; 5+ messages in thread
From: Alfred Minarik @ 2007-07-29  5:47 UTC (permalink / raw)
  To: 'Gerald Pfeifer', 'Ian Lance Taylor'
  Cc: gcc-patches, 'Tom Tromey'

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On Sat, 28 Jul 2007, Gerald Pfeifer wrote:
> > This patch:
> > 
> > http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00331.html
> > 
> > is OK for mainline.
>
>I believe Alfred does not have SVN write access.
>
>Alfred, if you send me a patch tested against current SVN, I will be
>happy to apply it for you.
>
>Gerald

Thanks for finalizing this old issue. Yes please apply it!

Again updated to current mainline (no changes), no regressions

gcc/gcc/cp/Changelog
----
2007-02-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.

----

gcc/gcc/Changelog
----
2007-02-04  Alfred Minarik  <a.minarik@aon.at>

	PR pch/13676
	* doc/invoke.texi: Add .hp,.hxx,.hpp,.h,.HPP,.tcc as c++ header

----


[-- Attachment #2: pr13676.patch --]
[-- Type: application/octet-stream, Size: 2578 bytes --]

Index: gcc/gcc/doc/invoke.texi
===================================================================
--- gcc/gcc/doc/invoke.texi	(revision 127021)
+++ gcc/gcc/doc/invoke.texi	(working copy)
@@ -913,6 +913,12 @@
 
 @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 @@
 @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
Index: gcc/gcc/cp/lang-specs.h
===================================================================
--- gcc/gcc/cp/lang-specs.h	(revision 127021)
+++ gcc/gcc/cp/lang-specs.h	(working copy)
@@ -34,6 +34,12 @@
   {".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: gcc/gcc/cp/g++spec.c
===================================================================
--- gcc/gcc/cp/g++spec.c	(revision 127021)
+++ gcc/gcc/cp/g++spec.c	(working copy)
@@ -236,6 +236,12 @@
 	    {
 	      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;
 	    }

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [C++ PATCH] PR13676 resubmission: Detect additional file extensions  as C++ headers
  2007-07-29  5:47   ` AW: " Alfred Minarik
@ 2007-08-06 11:11     ` Gerald Pfeifer
  0 siblings, 0 replies; 5+ messages in thread
From: Gerald Pfeifer @ 2007-08-06 11:11 UTC (permalink / raw)
  To: Alfred Minarik; +Cc: Ian Lance Taylor, gcc-patches, Tom Tromey

On Sun, 29 Jul 2007, Alfred Minarik wrote:
>> Alfred, if you send me a patch tested against current SVN, I will be
>> happy to apply it for you.
> Thanks for finalizing this old issue. Yes please apply it!
> 
> Again updated to current mainline (no changes), no regressions

Applied, with some tweaks to the ChangeLog entry:

        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.

Gerald

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [C++ PATCH] PR13676 resubmission: Detect additional file extensions as C++ headers
@ 2007-02-04 17:22 Alfred Minarik
  0 siblings, 0 replies; 5+ messages in thread
From: Alfred Minarik @ 2007-02-04 17:22 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

This is the resubmission of a very simple patch to automatically recognice
files ending .hp,.hxx,.hpp,h++,.HPP as C++ headers. (As we accept
.cc,.cp,.cxx,.cpp,.C,.c++,.CPP for C++ sources) usefull for
PCH generation. First submitted 2003 and accepted. 
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01210.html

Copyright assignment is done.

Benjamin Kosnik has later requested another C++ header type for
template instantiation headers: tcc.

Included in this updated patch.

gcc/gcc/cp/Changelog
----
2007-02-04  Alfred Minarik  <a.minarik@aon.at>

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

----

gcc/gcc/Changelog
----
2007-02-04  Alfred Minarik  <a.minarik@aon.at>

	* doc/invoke.texi: Add .hp,.hxx,.hpp,.h,.HPP,.tcc as c++ header

----

tested on i686-pc-linux-gnu (no regressions)

OK ? (I have no SVN write permission)

-Alfred



[-- Attachment #2: pr13676.patch --]
[-- Type: application/octet-stream, Size: 2542 bytes --]

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 121569)
+++ gcc/doc/invoke.texi	(working copy)
@@ -891,6 +891,12 @@
 
 @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
@@ -1101,7 +1107,8 @@
 @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
Index: gcc/cp/lang-specs.h
===================================================================
--- gcc/cp/lang-specs.h	(revision 121569)
+++ gcc/cp/lang-specs.h	(working copy)
@@ -34,6 +34,12 @@
   {".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: gcc/cp/g++spec.c
===================================================================
--- gcc/cp/g++spec.c	(revision 121569)
+++ gcc/cp/g++spec.c	(working copy)
@@ -228,6 +228,12 @@
 	    {
 	      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;
 	    }

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-06 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-27 15:56 [C++ PATCH] PR13676 resubmission: Detect additional file extensions as C++ headers Ian Lance Taylor
2007-07-27 22:34 ` Gerald Pfeifer
2007-07-29  5:47   ` AW: " Alfred Minarik
2007-08-06 11:11     ` Gerald Pfeifer
  -- strict thread matches above, loose matches on Subject: below --
2007-02-04 17:22 Alfred Minarik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).