[Bug c++/54348] confusing error reported for type mismatch in conditional expression : "error: no match for ternary 'operator?:' in 'false ?"

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 21 19:45:00 GMT 2012


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-08-21
            Summary|wrong error reported for    |confusing error reported
                   |type mismatch in            |for type mismatch in
                   |conditional expression :    |conditional expression :
                   |"error: no match for        |"error: no match for
                   |ternary 'operator?:' in     |ternary 'operator?:' in
                   |'false ?"                   |'false ?"
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-21 19:44:55 UTC ---
In mainline the diagnostics is better because we output the types. But I agree
that given that the conditional operator cannot be overloaded the error message
could be more clear.



More information about the Gcc-bugs mailing list