[Bug c++/13106] [3.4 Regression] Wrong warning "no return statement ..." for void template function

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 18 16:39:00 GMT 2003


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



More information about the Gcc-bugs mailing list