This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] More autodetecting c++-headers


Alfred Minarik <alfred.minarik@aon.at> writes:

> Hello,
> 
> With the new PHC it becomes more important to use
> c++-headers as arguments to g++.
> 
> for c++-sources we accept
> .cc,.cp,.cxx,.cpp,.c++,.C,.CPP
> 
> for c++-headers we only accept
> (.h),.H,.hh
> 
> Im sure I'm not the only one using .hpp.
> 
> I would suggest to add at least .hpp, but
> better for completeness all of:
> .hp,.hxx,.hpp,.h++,.HPP

This is OK.  Do you have a copyright assignment on file?

> 2003-01-19  Alfred Minarik  <alfred.minarik@aon.at>
> 
> 	* lang-specs.h: Add .hp,.hxx,.hpp,.h++,.HPP as c++-header
> 	* g++spec.c (lang_specific_driver): check for them also here.
> 	
> diff -r -C3 /home/internet/cvs_gcc/gcc/gcc/cp/g++spec.c gcc/gcc/cp/g++spec.c
> *** /home/internet/cvs_gcc/gcc/gcc/cp/g++spec.c Sat Jan 11 09:44:55 2003
> --- gcc/gcc/cp/g++spec.c        Sun Jan 19 09:52:28 2003
> ***************
> *** 222,227 ****
> --- 222,232 ----
>             {
>               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 <= 3 || strcmp (argv[i] + (len - 3), ".hh") != 0))
>                 library = 1;
>             }
> diff -r -C3 /home/internet/cvs_gcc/gcc/gcc/cp/lang-specs.h gcc/gcc/cp/lang-specs.h
> *** /home/internet/cvs_gcc/gcc/gcc/cp/lang-specs.h      Sat Jan 11 09:44:55 2003
> --- gcc/gcc/cp/lang-specs.h     Sun Jan 19 09:53:22 2003
> ***************
> *** 34,39 ****
> --- 34,45 ----
>     {".C",   "@c++", 0},
>     {".CPP", "@c++", 0},
>     {".H",   "@c++-header", 0},
> +       {".hpp",   "@c++-header", 0},
> +       {".hp",   "@c++-header", 0},
> +       {".hxx",   "@c++-header", 0},
> +       {".h++",   "@c++-header", 0},
> +       {".hpp",   "@c++-header", 0},
> +       {".HPP",   "@c++-header", 0},
>     {".hh",  "@c++-header", 0},
>     {"@c++-header",
>       "%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
> diff -r -C3 /home/internet/cvs_gcc/gcc/gcc/doc/invoke.texi gcc/gcc/doc/invoke.texi
> *** /home/internet/cvs_gcc/gcc/gcc/doc/invoke.texi      Fri Jan 17 19:54:45 2003
> --- gcc/gcc/doc/invoke.texi     Sun Jan 19 09:16:35 2003
> ***************
> *** 782,787 ****
> --- 782,792 ----
>   @samp{.C} refers to a literal capital C@.
> 
>   @item @var{file}.hh
> + @itemx @var{file}.hp
> + @itemx @var{file}.hxx
> + @itemx @var{file}.hpp
> + @itemx @var{file}.HPP
> + @itemx @var{file}.h++
>   @itemx @var{file}.H
>   C++ header file to be turned into a precompiled header.
> 

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]