public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14407] New: __noreturn__ is not honnored in template functions
@ 2004-03-03 14:17 gcc-bugzilla at gcc dot gnu dot org
  2004-03-03 15:12 ` [Bug c++/14407] " akim at epita dot fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-03-03 14:17 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]


The following example is quite clear enough.  Note that the failure is
on the template function, not on the regular function.

/tmp % eof foo.cc                                                nostromo 15:16
: -------------------- foo.cc ----------------------
cat > foo.cc << \EOF
void die () __attribute__ ((__noreturn__));

int
passes ()
{
  die ();
}

template <class T>
int
fails ()
{
  die ();
}
EOF
: ------------------------------------------------------------
/tmp % g++-3.2 -Wall foo.cc -c
/tmp % g++-3.3 -Wall foo.cc -c
/tmp % g++-3.4 -Wall foo.cc -c
foo.cc: In function `int fails()':
foo.cc:14: AVERTISSEMENT: pas de déclaration « return » dans la fonction retournant un non void
/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

Environment:
System: Linux nostromo 2.4.22 #1 SMP mer sep 17 19:49:48 CEST 2003 i686 GNU/Linux
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure

How-To-Repeat:

See above.
------- Additional Comments From akim at lrde dot epita dot fr  2004-03-03 14:17 -------
Fix:
Dunno :)

-- 
           Summary: __noreturn__ is not honnored in template functions
           Product: gcc
           Version: 3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: akim at lrde dot epita dot fr
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-13 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-03 14:17 [Bug c++/14407] New: __noreturn__ is not honnored in template functions gcc-bugzilla at gcc dot gnu dot org
2004-03-03 15:12 ` [Bug c++/14407] " akim at epita dot fr
2004-03-03 16:18 ` bangerth at dealii dot org
2004-07-13 16:58 ` reichelt at gcc dot gnu dot org

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).