https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22434
Harald van Dijk <harald at gigawatt dot nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #11 from Harald van Dijk <harald at gigawatt dot nl> --- (In reply to Jason Merrill from comment #10) I was about to report a new bug, but I think that you have already fixed the problem here. Perhaps the test cases I was going to suggest would still be useful to add: struct T; struct S { operator T(); }; struct T { operator S(); }; const S f(); volatile T g(); void h() { true ? f() : g(); } or struct S { S(void *); operator int(); }; const S f(); void g() { true ? f() : 1; } are accepted by GCC 4.9 without any diagnostic. Take out one of the bad conversions, and the other causes the correct error to be shown. (-pedantic causees the bad conversions to be rejected earlier, but the errors here are errors that are supposed to show up even without -pedantic, and normally they do.)