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/25682] [4.0/4.1/4.2 Regression] ICE when using old sytle offsetof (with non zero start) as array size



------- Comment #7 from jakub at gcc dot gnu dot org  2006-01-17 10:00 -------
Subject: Bug 25682

Author: jakub
Date: Tue Jan 17 10:00:05 2006
New Revision: 109813

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109813
Log:
        PR c/25682
        * c-typeck.c (build_unary_op): Fold offsetof-like expressions
        even when the pointer is not NULL.
cp/
        * decl.c (compute_array_index_type): After issuing not an integral
        constant-expression error, set size to 1 to avoid ICEs later on.
testsuite/
        * gcc.dg/pr25682.c: New test.
        * g++.dg/parse/array-size2.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/array-size2.C
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr25682.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/c-typeck.c
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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