public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/40056] implicit instantiation of function templates fails with -O2, works with -O and -g...
Date: Thu, 08 Mar 2012 14:44:00 -0000	[thread overview]
Message-ID: <bug-40056-4-rJQu0iBkv6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-40056-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40056

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-08 14:42:58 UTC ---
It's not a bug though, since you're expecting behaviour which is not guaranteed
and never has been guaranteed.

Why does it matter?  If you have another file where you suppress implicit
instantiation (either by 'extern template' or -fno-implicit-templates) then you
are required to provide an explicit instantiation somewhere in the program.
Assuming an implicit instantiation will happen is an incorrect.


  parent reply	other threads:[~2012-03-08 14:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-40056-4@http.gcc.gnu.org/bugzilla/>
2011-09-28 22:05 ` paolo.carlini at oracle dot com
2012-03-08 14:29 ` bircoph at gmail dot com
2012-03-08 14:44 ` redi at gcc dot gnu.org [this message]
2012-03-08 15:12 ` bircoph at gmail dot com
2012-03-08 15:49 ` redi at gcc dot gnu.org
2012-03-08 20:45 ` bircoph at gmail dot com
2012-03-08 21:06 ` redi at gcc dot gnu.org
2012-03-08 21:17 ` Fons.Rademakers at cern dot ch
2012-03-08 23:27 ` bircoph at gmail dot com
2009-05-07  9:59 [Bug c++/40056] New: " Fons dot Rademakers at cern dot ch
2009-05-07 10:02 ` [Bug c++/40056] " Fons dot Rademakers at cern dot ch
2009-05-07 12:24 ` pinskia at gcc dot gnu dot org
2009-05-07 12:25 ` pinskia at gcc dot gnu dot org
2009-05-07 13:55 ` Fons dot Rademakers at cern dot ch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-40056-4-rJQu0iBkv6@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).