public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: gcc-gnats@gcc.gnu.org
Subject: c++/5373: Statement expressions broken in C++
Date: Mon, 14 Jan 2002 02:26:00 -0000	[thread overview]
Message-ID: <200201141019.g0EAJFn04231@gadolinium.suse.de> (raw)


>Number:         5373
>Category:       c++
>Synopsis:       Statement expressions broken in C++
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 14 02:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020107 (experimental)
>Organization:
>Environment:
System: Linux gadolinium 2.4.7-SMP #1 SMP Fri Nov 23 12:13:10 GMT 2001 ia64 unknown
Architecture: ia64

	
host: ia64-suse-linux-gnu
build: ia64-suse-linux-gnu
target: ia64-suse-linux-gnu
configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared ia64-suse-linux
>Description:
The C++ compiler does not accept certain kinds of statement expressions.
Apparently it only accepts those that can be folded to a simple constant
at compile time.
>How-To-Repeat:
$ cat stmtexpr.cc
int
main (int argc, char **argv)
{
  int a = ({ 1 ? 0 : 1; });
  return ({ argc > 1 ? 1 : 0; });
}
$ gcc -c stmtexpr.cc 
stmtexpr.cc: In function `int main(int, char**)':
stmtexpr.cc:5: void value not ignored as it ought to be
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-01-14 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-14  2:26 Andreas Schwab [this message]
2002-03-12  9:28 jakub
2002-04-12 18:48 mmitchel
2002-04-13  0:14 mmitchel

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=200201141019.g0EAJFn04231@gadolinium.suse.de \
    --to=schwab@suse.de \
    --cc=gcc-gnats@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).