diff options
author | Richard Henderson <rth@redhat.com> | 2005-03-29 17:35:15 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-03-29 17:35:15 -0800 |
commit | aab038d54ae4614f347c0b446ff505fc204ad38e (patch) | |
tree | c268ffdf655de9176ff5a95683d1e4bfc230ad87 /gcc/c-common.h | |
parent | 748e31c32624a6da22db9330601faf19aaf24f05 (diff) | |
download | gcc-aab038d54ae4614f347c0b446ff505fc204ad38e.zip gcc-aab038d54ae4614f347c0b446ff505fc204ad38e.tar.gz gcc-aab038d54ae4614f347c0b446ff505fc204ad38e.tar.bz2 |
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
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 63dcb10..7794ade 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -888,6 +888,8 @@ enum lvalue_use { extern void lvalue_error (enum lvalue_use); +extern int complete_array_type (tree *, tree, bool); + /* In c-gimplify.c */ extern void c_genericize (tree); extern int c_gimplify_expr (tree *, tree *, tree *); |