Thread: compilation error: more than one operator "&&" matches these operands:

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    compilation error: more than one operator "&&" matches these operands:

    Hi,

    I dont know if this is the right group to post this message, but I
    hope you can help me with this issue. I am trying to compile a C/C++
    application, but I am getting the attached error. At this point I am
    lost, I wonder if somebody can help me or give me some guidelines of
    how to solve this problem.

    Thanks in advance,

    jg
    Code:
    "/SX/usr/include/C++/istream", line 97: fatal(350): more than one
    operator "&&"
              matches these operands:
                built-in operator "bool && bool"
                function "operator&&(const intArray &, int)"
                operand types are: bool && std::_Iosb<int>::_Fmtflags
                  if (!_Noskip && ios_base::flags() & ios_base::skipws)
                              ^
              detected during:
                instantiation of "bool std::basic_istream<_Elem,
                          _Traits>::_Ipfx(bool) [with _Elem=char,
                          _Traits=std::char_traits<char>]" at line 75
                instantiation of "std::basic_istream<_Elem,
                          _Traits>::sentry::sentry
    (std::basic_istream<_Elem,
                          _Traits> &, bool) [with _Elem=char,
                          _Traits=std::char_traits<char>]" at line 219
                instantiation of "std::basic_istream<_Elem, _Traits>
                          &std::basic_istream<_Elem, _Traits>::operator>>
    (int &)
                          [with _Elem=char,
    _Traits=std::char_traits<char>]" at
                          line 931 of "check.C"
    
    "/SX/usr/include/C++/istream", line 232: fatal(350): more than one
    operator
              "||" matches these operands:
                built-in operator "bool || bool"
                function "operator||(int, const intArray &)"
                operand types are: std::_Iosb<int>::_Iostate || bool
                      || _Tmp < INT_MIN || INT_MAX < _Tmp)
                      ^
              detected during instantiation of "std::basic_istream<_Elem,
    _Traits>
                        &std::basic_istream<_Elem, _Traits>::operator>>
    (int &)
                        [with _Elem=char, _Traits=std::char_traits<char>]"
    at line
                        931 of "check.C"
    Last edited by Salem; 08-17-2009 at 09:27 AM. Reason: Added [code][/code] tags for code-like content.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Please post the code which gave you the error.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    4
    it is a huge framework and the file in question is a big one as well, but if you want I can send it to you

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Well, at least post the code on line 931 of check.C, along with sufficient context so that it makes sense. It would be good if you could post the smallest and simplest compilable program that demonstrates the error. Oh, and post code in [code][/code] bbcode tags.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Has no one ever compiled this vast framework before? Or did this suddenly happen after a few changes this morning? (Overloading && and || with one side being an intrinsic data type seems at first glance like it would be prone to this sort of error all the time.)

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    Check.C

    I attachc the code, I hope it helps


    cheers,

    jg

  7. #7
    Registered User
    Join Date
    Aug 2009
    Posts
    4
    btw, I am cross-compiling.
    The app compiles with no problem using native compilers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. modulus operator with double operands?
    By chickenandfries in forum C Programming
    Replies: 7
    Last Post: 03-28-2008, 07:21 AM
  2. Simple C++ Compilation Question
    By mercury529 in forum C++ Programming
    Replies: 14
    Last Post: 07-30-2006, 09:40 PM
  3. Need help with C program
    By ChrisH in forum C Programming
    Replies: 38
    Last Post: 11-13-2004, 01:11 AM
  4. MS VC++ Crash on compilation
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-23-2003, 07:06 PM
  5. malloc problem in SUN in 64-bit compilation
    By ylzhang in forum C Programming
    Replies: 6
    Last Post: 05-31-2003, 11:48 AM