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

2014-05-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #10 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Fri May 9 18:15:57 2014 New Revision: 210282 URL: http://gcc.gnu.org/viewcvs?rev=210282root=gccview=rev Log: PR c++/32019 * call.c

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

2014-05-09 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

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

2012-08-22 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org 2012-08-22 07:37:18 UTC --- (In reply to comment #5) strct s struct_strct( items, myItems, name, myName ) ; } /code This works! Only because NULL can be converted to

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

2012-08-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Keywords||diagnostic

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

2012-08-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2012-08-21 19:51:53 UTC --- (In reply to comment #0) Shouldn't g++ be complaining about initializing a string with a liststring rather than this cryptic no match for ternary

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

2012-08-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2012-08-21 20:08:02 UTC --- Indeed. About my own reply, I'm not sure, the wording here is pretty subtle, we already handle separately the ambiguous overloading case. ICC refers

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

2012-08-21 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #4 from Jonathan Wakely redi at gcc dot gnu.org 2012-08-21 20:24:15 UTC --- I think clang's incompatible operand types is simple and fairly clear

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

2012-08-21 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #5 from Jason Vas Dias jason.vas.dias at gmail dot com 2012-08-21 20:27:36 UTC --- Oops, I was interrupted adding this comment to my initial comment - will respond to subsequent commment next : Incidentally, I found this issue while

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

2012-08-21 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #6 from Jason Vas Dias jason.vas.dias at gmail dot com 2012-08-21 20:29:53 UTC --- (In reply to comment #1) In mainline the diagnostics is better because we output the types. But I agree that given that the conditional operator

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

2012-08-21 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #7 from Jason Vas Dias jason.vas.dias at gmail dot com 2012-08-21 20:34:06 UTC --- (In reply to comment #2) (In reply to comment #0) Shouldn't g++ be complaining about initializing a string with a liststring rather than this

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

2012-08-21 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54348 --- Comment #8 from Jason Vas Dias jason.vas.dias at gmail dot com 2012-08-21 20:52:12 UTC --- All I'm suggesting is that g++ should try to find the most basic error, which is that different type objects are returned as the result of a