public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu>
To: gcc-bugzilla@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug c++/28943] Unusable error message when using a 	conditional-expression with multiple type arguments
Date: Sun, 03 Sep 2006 20:18:00 -0000	[thread overview]
Message-ID: <1157314694.24185.42.camel@celery.andrew.com> (raw)
In-Reply-To: <20060903200803.17469.qmail@sourceware.org>

On Sun, 2006-09-03 at 20:08 +0000, lindevel at gmx dot net wrote:
> 
> ------- Comment #4 from lindevel at gmx dot net  2006-09-03 20:08 -------
> You proved ##c++ wrong! They bet that I would be ignored. ;)
> 
> The thing is that a void itself is not invalid. Using (expr ? void : void)
> works as you see in my report.
> In ##c++ I was told that ( x ? y : z ) wants both y and z to be of the same
> type. And that is stated in no way by the error message.

void is valid if the both sides of the : are void, otherwise it is
invalid.  And they don't have to be the same type either, they can be
different as long as one is convertible to the other (like float and int
or two classes where one is a base class of the other).


-- Pinski


  reply	other threads:[~2006-09-03 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-03 19:35 [Bug c++/28943] New: " lindevel at gmx dot net
2006-09-03 19:36 ` [Bug c++/28943] " lindevel at gmx dot net
2006-09-03 19:36 ` lindevel at gmx dot net
2006-09-03 19:41 ` pinskia at physics dot uc dot edu
2006-09-03 19:41 ` [Bug c++/28943] New: " Andrew Pinski
2006-09-03 20:08 ` [Bug c++/28943] " lindevel at gmx dot net
2006-09-03 20:18   ` Andrew Pinski [this message]
2006-09-03 20:18 ` pinskia at physics dot uc dot edu
2006-09-03 20:38 ` lindevel at gmx dot net
2007-01-31  9:45 ` patchapp at dberlin dot org
2007-02-15 22:15 ` manu at gcc dot gnu dot org
2007-02-15 22:35 ` manu at gcc dot gnu dot 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=1157314694.24185.42.camel@celery.andrew.com \
    --to=pinskia@physics.uc.edu \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@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).