This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13106] [3.4 Regression] Wrong warning "no return statement ..." for void template function
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2003 16:39:53 -0000
- Subject: [Bug c++/13106] [3.4 Regression] Wrong warning "no return statement ..." for void template function
- References: <20031118141241.13106.stip@mathematik.uni-ulm.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-18 16:39 -------
The problem is that GCC warns when the template is defined now, reproduce by commenting out
the main or removing it:
template <typename T>
struct True
{
static const bool value=true;
};
template <bool b, class T>
struct restrictTo
{
typedef T type;
};
template <typename A>
typename restrictTo<True<A>::value, void>::type
dummy(const A &a)
{
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-11-18 16:39:51
date| |
Summary|[Regression 3.4] Wrong |[3.4 Regression] Wrong
|warning "no return statement|warning "no return statement
|..." for void template |..." for void template
|function |function
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13106