This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
- From: "bircoph at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Mar 2012 23:27:15 +0000
- Subject: [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
- Auto-submitted: auto-generated
- References: <bug-40056-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056
--- Comment #12 from Andrew Savchenko <bircoph at gmail dot com> 2012-03-08 23:27:15 UTC ---
Hello,
(In reply to comment #10)
> No, they aren't just like normal functions.
>
> Maybe you should read
> http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12
Thank you again, I misunderstood concept behind template implementation.
(In reply to comment #11)
> the source code now (r43307) uses explicit instantiation and should work on
> Gentoo with all compiler versions and optimization levels.
>
> If you want older versions to work remove the conditionals at the bottom of
> io/io/Module.mk.
Thanks for fixing this problem. I'll apply the solution to our packages soon.