GCC Bugzilla – Bug 13676
GCC failes to recognize files ending in .hpp as headers to be precompiled
Last modified: 2007-08-06 21:43:59 UTC
Pass any header file with a suffix ending in .hpp to the compiler. If -c is specified, you recieve the message that "linker input file foo.hpp ignored because linking not done", and if -c is not specified, it is passed on verbatim to the linker which cannot subsequently determine the file type. I think the most robust fix for this is to supply an argument to the -x flag such as "c++-pch" or "c-pch" to force the compiler to treat it as a header file to be pre-compiled. This would also enable projects that do more exotic things with #include to take advantage of PCH.
Patch is here: <http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01317.html>, reviewed (almost a year later wow): <http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01210.html>.
Someone should apply this patch.
*** Bug 25323 has been marked as a duplicate of this bug. ***
Created attachment 10625 [details] patch for 4.1 branch. please check-in this patch befor 4.1.0-final.
ping. 4.1 & 4.2 still need this patch.
The author didn't respond to my question about copyright assignment, so I don't think the patch can be applied.
(In reply to comment #6) > The author didn't respond to my question about copyright assignment, so I don't > think the patch can be applied. it's weird to waiting years for respond about such trivial patch.
*** Bug 29221 has been marked as a duplicate of this bug. ***
Hello, well I did the paperworks then http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01299.html and resent after that with minor modification too http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00597.html would be cool adding after another 2 years...
Is this patch just waiting for someone to commit it? The paperwork is all done? If so please respond and I will check it in.
Created attachment 12847 [details] Updated patch including tcc for mainline Yes this is right. in Comment #4 there was an update of the first version for current mainline. Please note that Benjamin Kosnik has requested another C++ header type for Template insantiation headers: tcc. I have included that then in an updated patch. http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00597.html Just saw that I added hpp twice in cp/lang-specs.h. Corrected and bootstraped/make checked just in case...(no problems) Added this patch updated for mainline as attachment. if you prefere also adding tcc. Please take changelog from mentioned link. Thanks.
and we'll wait another years to commit this trivial thing :>
I'm not sure whether the updated patch can be committed without another review. I'll try to find out.
*** Bug 30692 has been marked as a duplicate of this bug. ***
I think you need to resubmit the updated patch. Sorry about that. But I don't think that, in general, an approval still applies once the patch has been changed. If you do it soon I will try to include this in my list of patches when I ping about the cpp patch backlog.
(In reply to comment #15) > I think you need to resubmit the updated patch. Done http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00331.html
Subject: Bug 13676 Author: gerald Date: Mon Aug 6 11:10:19 2007 New Revision: 127239 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127239 Log: 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. Modified: trunk/gcc/ChangeLog trunk/gcc/cp/ChangeLog trunk/gcc/cp/g++spec.c trunk/gcc/cp/lang-specs.h trunk/gcc/doc/invoke.texi
Fixed.