This is the mail archive of the gcc-bugs@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]

[Bug c++/14407] __noreturn__ is not honnored in template functions


------- Additional Comments From akim at epita dot fr  2004-03-03 15:12 -------
Subject: Re:  New: __noreturn__ is not honnored in template
 functions

>>> "gcc-bugzilla" == gcc-bugzilla at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> writes:

 > : -------------------- foo.cc ----------------------
 > cat > foo.cc << \EOF
 > void die () __attribute__ ((__noreturn__));

 > int
 > passes ()
 > {
 >   die ();
 > }

 > template <class T>
 > int
 > fails ()
 > {
 >   die ();
 > }
 > EOF
 > : ------------------------------------------------------------

 > /tmp % LANG=C g++-3.4 -Wall foo.cc -c
 > foo.cc: In function `int fails()':
 > foo.cc:14: warning: no return statement in function returning non-void

Sorry about the noise.  It turns out my environment is not what I
believed it was: g++-3.4 was old, and using a more recent 3.4, the
test passes as expected.  I apologize for the waste of time and
bandwidth :(

~/src/tc % /usr/lib/gcc-snapshot/bin/g++ --version
g++ (GCC) 3.4.0 20040215 (prerelease)
Copyright (C) 2004 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.

/tmp % /usr/lib/gcc-snapshot/bin/g++ -c foo.cc


-- 


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


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