This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2007 23:17:01 -0000
- Subject: [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following IMHO valid code snippet is rejected since GCC 3.4.0:
===========================
bool b = !0i;
===========================
bug.cc:1: error: could not convert '#'complex_cst' not supported by
dump_expr#<expression error>' to 'bool'
bug.cc:1: error: in argument to unary !
The C front-end accepts complex constants as argument to "!".
This is related to PR30209.
Btw, the fact that dump_expr cannot handle complex_cst is already
tracked in PR 30896.
--
Summary: [4.1/4.2/4.3 regression] Cannot apply "!" to complex
constants
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
BugsThisDependsOn: 30209
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338