re PR c/20519 (completed type not selected properly with typeof)
authorRichard Henderson <rth@redhat.com>
Wed, 30 Mar 2005 01:35:15 +0000 (17:35 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 30 Mar 2005 01:35:15 +0000 (17:35 -0800)
commitaab038d54ae4614f347c0b446ff505fc204ad38e
treec268ffdf655de9176ff5a95683d1e4bfc230ad87
parent748e31c32624a6da22db9330601faf19aaf24f05
re PR c/20519 (completed type not selected properly with typeof)

        PR c/20519
        * c-decl.c (c_finish_incomplete_decl): Update complete_array_type call.
        (build_compound_literal): Likewise.  Propagate decl type into the
        initializer.
        (finish_decl): Likewise.  Use new return value from complete_array_type
        for zero sized arrays.
        (complete_array_type): Move ...
        * c-common.c (complete_array_type): ... here.  Change first argument
        to pointer-to-type-node.  Consistently use sizetype for the index
        except for zero sized arrays.  Detect zero sized arrays for pedantic
        mode diagnostics.  Create a new type node instead of modifying the
        old node in place.
        * c-tree.h (complete_array_type): Move decl ...
        * c-common.h (complete_array_type): ... here.
cp/
        * decl.c (cp_complete_array_type): Rename from complete_array_type.
        Use the new complete_array_type in c-common.c.  Update all callers.
        * cp-tree.h (cp_complete_array_type): Update to match.

From-SVN: r97223
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/c-tree.h
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/semantics.c
gcc/cp/typeck2.c