This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49027] g++ ignores -fno-exceptions in uninstantiated template
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 May 2011 10:04:15 +0000
- Subject: [Bug c++/49027] g++ ignores -fno-exceptions in uninstantiated template
- Auto-submitted: auto-generated
- References: <bug-49027-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49027
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-18 09:43:37 UTC ---
I'm not sure. What about
extern int f2();
struct NoExcept {};
template<typename T>
void f1() {
try { f2(); } catch (...) { }
}
template<>
void f1<NoExcept>() {
f2();
}
template f1<NoExcept>();
? EH code could be disabled by some tags and specialization. Especially
for a library that has a non-exception variant that would sound useful.