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++/13106] [3.4 Regression] Wrong warning "no return statement ..." for void template function


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


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