This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]