long f( long& );
template < typename T, bool B >
struct X
{
        X() : r_()
        {
                B ? f( r_ ) : ++r_;
        }
        long r_;
};
X< int, false > h;


$ /opt/gcc43/bin/g++ t.cpp -Wall -c
t.cpp: In constructor 'X<T, B>::X() [with T = int, bool B = false]':
t.cpp:11:   instantiated from here
t.cpp:7: warning: value computed is not used

this bug may be related to PR26632.


-- 
           Summary: spurious warning: value computed is not used
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net


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

Reply via email to