public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jason.vas.dias at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/54348] confusing error reported for type mismatch in conditional expression : "error: no match for ternary 'operator?:' in 'false ?"
Date: Tue, 21 Aug 2012 20:52:00 -0000	[thread overview]
Message-ID: <bug-54348-4-DUITaVMmb5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54348-4@http.gcc.gnu.org/bugzilla/>

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
conditional expression, and not  "no match for ternary 'operator?:'" -
what does this mean, it was searching namespace std:: for string::operator::?:
?
then this succeeded, and it found it could not apply it because the types
were different - shouldn't it complain about the root cause, that the types
were different, rather than the symptom of not being able to satisfy
operator std::string::?:() ?


  parent reply	other threads:[~2012-08-21 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 19:28 [Bug c++/54348] New: wrong " jason.vas.dias at gmail dot com
2012-08-21 19:45 ` [Bug c++/54348] confusing " paolo.carlini at oracle dot com
2012-08-21 19:52 ` redi at gcc dot gnu.org
2012-08-21 20:08 ` paolo.carlini at oracle dot com
2012-08-21 20:24 ` redi at gcc dot gnu.org
2012-08-21 20:27 ` jason.vas.dias at gmail dot com
2012-08-21 20:30 ` jason.vas.dias at gmail dot com
2012-08-21 20:34 ` jason.vas.dias at gmail dot com
2012-08-21 20:52 ` jason.vas.dias at gmail dot com [this message]
2012-08-22  7:38 ` redi at gcc dot gnu.org
2014-05-09 18:16 ` jason at gcc dot gnu.org
2014-05-09 18:21 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54348-4-DUITaVMmb5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).