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

mmitchel at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 4 17:18:00 GMT 2007



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



More information about the Gcc-bugs mailing list