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


gcc3.4 emits warning about missing return statement for template functions with return type  
void in some cases (with -Wall). An example: 
 
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) 
{ 
} 
 
int 
main() 
{ 
    dummy(2.0); 
}

-- 
           Summary: [Regression 3.4] Wrong warning "no return statement ..."
                    for void template function
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stip at mathematik dot uni-ulm dot de
                CC: gcc-bugs at gcc dot gnu dot org


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]