public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31338]  New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
@ 2007-03-24 23:17 reichelt at gcc dot gnu dot org
  2007-03-24 23:18 ` [Bug c++/31338] " reichelt at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-24 23:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
@ 2007-03-24 23:18 ` reichelt at gcc dot gnu dot org
  2007-03-29 10:01 ` rsandifo at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-24 23:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
  2007-03-24 23:18 ` [Bug c++/31338] " reichelt at gcc dot gnu dot org
@ 2007-03-29 10:01 ` rsandifo at gcc dot gnu dot org
  2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-03-29 10:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rsandifo at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-29 11:01:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
@ 2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
  2007-04-15 22:07 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-03-29 10:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rsandifo at gcc dot gnu dot org  2007-03-29 11:03 -------
Sigh.  Wrong bug #, sorry.


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rsandifo at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
  2007-03-24 23:18 ` [Bug c++/31338] " reichelt at gcc dot gnu dot org
  2007-03-29 10:01 ` rsandifo at gcc dot gnu dot org
@ 2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
  2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2007-03-29 10:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rsandifo at gcc dot gnu dot org  2007-03-29 11:02 -------
Sigh.  Wrong bug #, sorry.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
@ 2007-04-15 22:07 ` mmitchel at gcc dot gnu dot org
  2007-04-23 16:07 ` janis at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-04-15 22:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-04-15 22:07 ` mmitchel at gcc dot gnu dot org
@ 2007-04-23 16:07 ` janis at gcc dot gnu dot org
  2007-04-23 21:44 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-04-23 16:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from janis at gcc dot gnu dot org  2007-04-23 17:06 -------
A regression hunt on powerpc-linux identified the following patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=69715

    r69715 | mmitchel | 2003-07-23 18:44:43 +0000 (Wed, 23 Jul 2003)


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-04-23 16:07 ` janis at gcc dot gnu dot org
@ 2007-04-23 21:44 ` mmitchel at gcc dot gnu dot org
  2007-04-26  2:37 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-04-23 21:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-04-26  2:37 ` mmitchel at gcc dot gnu dot org
@ 2007-04-26  2:37 ` mmitchel at gcc dot gnu dot org
  2007-04-28  2:50 ` howarth at nitro dot med dot uc dot edu
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-04-26  2:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2007-04-26 03:37 -------
Fixed in 4.3.0.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3 regression]    |[4.1/4.2 regression] Cannot
                   |Cannot apply "!" to complex |apply "!" to complex
                   |constants                   |constants


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-04-23 21:44 ` mmitchel at gcc dot gnu dot org
@ 2007-04-26  2:37 ` mmitchel at gcc dot gnu dot org
  2007-04-26  2:37 ` [Bug c++/31338] [4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-04-26  2:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2007-04-26 03:37 -------
Subject: Bug 31338

Author: mmitchel
Date: Thu Apr 26 03:37:20 2007
New Revision: 124173

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124173
Log:
Fix PR# in ChangeLog:

        PR c++/31338
        * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
        * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
        COMPLEX_TYPE is now an ARITHMETIC_TYPE.
        * init.c (build_zero_init): Adjust, as
        COMPLEX_TYPE is now a SCALAR_TYPE.
        * typeck2.c (digest_init): Allow brace-enclosed initializers for
        COMPLEX_TYPE, even though that is now a SCALAR_TYPE.

        PR c++/31338
        * g++.dg/ext/complex2.C: New test.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-04-26  2:37 ` [Bug c++/31338] [4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2007-04-28  2:50 ` howarth at nitro dot med dot uc dot edu
  2007-04-29  6:55 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2007-04-28  2:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from howarth at nitro dot med dot uc dot edu  2007-04-28 03:50 -------
Are you backporting the fix from trunk for gcc 4.2 RC?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-04-28  2:50 ` howarth at nitro dot med dot uc dot edu
@ 2007-04-29  6:55 ` pinskia at gcc dot gnu dot org
  2007-07-04 17:18 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-29  6:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2007-04-29 07:55 -------
(In reply to comment #6)
> Are you backporting the fix from trunk for gcc 4.2 RC?
Do you even read the patches list?
>From http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01763.html :
I've checked in the patch on mainline.  I'm going to hold off on putting
it on the release branches because (a) it's a big enough change that
there may be follow-on issues, (b) it was broken in 4.1.x too, and (c)
it's an extension.  After 4.2.0 is out, I'll check it in there, if there
haven't been problems.

So the answer to that question is NO.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1/4.2 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-04-29  6:55 ` pinskia at gcc dot gnu dot org
@ 2007-07-04 17:18 ` mmitchel at gcc dot gnu dot org
  2007-07-04 17:27 ` [Bug c++/31338] [4.1 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-04 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mmitchel at gcc dot gnu dot org  2007-07-04 17:18 -------
Subject: Bug 31338

Author: mmitchel
Date: Wed Jul  4 17:18:22 2007
New Revision: 126329

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126329
Log:
        PR c++/31388
        * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
        * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
        COMPLEX_TYPE is now an ARITHMETIC_TYPE.
        * init.c (build_zero_init): Adjust, as
        COMPLEX_TYPE is now a SCALAR_TYPE.
        * typeck2.c (digest_init): Allow brace-enclosed initializers for
        COMPLEX_TYPE, even though that is now a SCALAR_TYPE.

        PR c++/31338
        * g++.dg/ext/complex2.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/ext/complex2.C
      - copied unchanged from r124172,
trunk/gcc/testsuite/g++.dg/ext/complex2.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/cp-tree.h
    branches/gcc-4_2-branch/gcc/cp/init.c
    branches/gcc-4_2-branch/gcc/cp/typeck.c
    branches/gcc-4_2-branch/gcc/cp/typeck2.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2007-07-04 17:18 ` mmitchel at gcc dot gnu dot org
@ 2007-07-04 17:27 ` mmitchel at gcc dot gnu dot org
  2007-07-07 10:43 ` reichelt at gcc dot gnu dot org
  2008-07-04 16:05 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-04 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2007-07-04 17:27 -------
Fixed in 4.2.1.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.1/4.2 regression] Cannot |[4.1 regression] Cannot
                   |apply "!" to complex        |apply "!" to complex
                   |constants                   |constants


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2007-07-04 17:27 ` [Bug c++/31338] [4.1 " mmitchel at gcc dot gnu dot org
@ 2007-07-07 10:43 ` reichelt at gcc dot gnu dot org
  2008-07-04 16:05 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-07-07 10:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from reichelt at gcc dot gnu dot org  2007-07-07 10:43 -------
This fix ported PR 31780 back to the 4.2 branch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/31338] [4.1 regression] Cannot apply "!" to complex constants
  2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2007-07-07 10:43 ` reichelt at gcc dot gnu dot org
@ 2008-07-04 16:05 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2008-07-04 16:04 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.1.3
         Resolution|                            |FIXED
   Target Milestone|4.1.3                       |4.2.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31338


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-07-04 16:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-24 23:17 [Bug c++/31338] New: [4.1/4.2/4.3 regression] Cannot apply "!" to complex constants reichelt at gcc dot gnu dot org
2007-03-24 23:18 ` [Bug c++/31338] " reichelt at gcc dot gnu dot org
2007-03-29 10:01 ` rsandifo at gcc dot gnu dot org
2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
2007-03-29 10:03 ` rsandifo at gcc dot gnu dot org
2007-04-15 22:07 ` mmitchel at gcc dot gnu dot org
2007-04-23 16:07 ` janis at gcc dot gnu dot org
2007-04-23 21:44 ` mmitchel at gcc dot gnu dot org
2007-04-26  2:37 ` mmitchel at gcc dot gnu dot org
2007-04-26  2:37 ` [Bug c++/31338] [4.1/4.2 " mmitchel at gcc dot gnu dot org
2007-04-28  2:50 ` howarth at nitro dot med dot uc dot edu
2007-04-29  6:55 ` pinskia at gcc dot gnu dot org
2007-07-04 17:18 ` mmitchel at gcc dot gnu dot org
2007-07-04 17:27 ` [Bug c++/31338] [4.1 " mmitchel at gcc dot gnu dot org
2007-07-07 10:43 ` reichelt at gcc dot gnu dot org
2008-07-04 16:05 ` jsm28 at gcc dot gnu dot org

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).