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++/11990] New: "operand of conditional has no effect" warnings in libstdc++


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: "operand of conditional has no effect" warnings in
                    libstdc++
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gerald at pfeifer dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-unknown-freebsd4.8

Compile the following with -O3 -Wall:

  #include <iostream>

  using namespace std;

  int main(int argc, char **) {
    cout << "argc = " << argc;
  }

Current CVS issues the following warnings:

/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:
In
   static member function `static void std::__pad<_CharT, 
   _Traits>::_S_pad(std::ios_base&, _CharT, _CharT*, const _CharT*, streamsize, 
   streamsize, bool) [with _CharT = char, _Traits = std::char_traits<char>]':
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:649:
  instantiated from `void std::num_put<_CharT, _OutIter>::_M_pad(_CharT,
streamsize, std::ios_base&, _CharT*, const _CharT*, int&) const [with _CharT =
char, _OutIter = std::ostreambuf_iterator<char, std::char_traits<char> >]'
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:837:
  instantiated from `_OutIter std::num_put<_CharT,
_OutIter>::_M_insert_int(_OutIter, std::ios_base&, _CharT, _ValueT) const [with
_ValueT = long unsigned int, _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:1049:
  instantiated from `_OutIter std::num_put<_CharT, _OutIter>::do_put(_OutIter,
std::ios_base&, _CharT, long unsigned int) const [with _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.h:944:
  instantiated from `_OutIter std::num_put<_CharT, _OutIter>::put(_OutIter,
std::ios_base&, _CharT, long unsigned int) const [with _CharT = char, _OutIter =
std::ostreambuf_iterator<char, std::char_traits<char> >]'
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/ostream.tcc:224:
  instantiated from `std::basic_ostream<_CharT, _Traits>&
std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT
= char, _Traits = std::char_traits<char>]'
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/ostream:196:
  instantiated from `std::basic_ostream<_CharT, _Traits>&
std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char,
_Traits = std::char_traits<char>]'
x.cc:6:   instantiated from here
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:2241:
warning: second
   operand of conditional has no effect
/gcc-current/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4/../../../../include/c++/3.4/bits/locale_facets.tcc:2241:
warning: third
   operand of conditional has no effect


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