aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-01-09 09:09:53 +0000
committerRichard Stallman <rms@gnu.org>1993-01-09 09:09:53 +0000
commit58811315a132151e35e7b12d357dbffdd46a14d7 (patch)
tree131ce151f9eb660a0f65d9eede19e59aff6ae38b
parentc10afc44d5e8cef1a4fc67f5122cc85924b1eb04 (diff)
downloadgcc-58811315a132151e35e7b12d357dbffdd46a14d7.zip
gcc-58811315a132151e35e7b12d357dbffdd46a14d7.tar.gz
gcc-58811315a132151e35e7b12d357dbffdd46a14d7.tar.bz2
(init_decl_processing): Use unsigned_intQI_type_node,
not unsigned_char_..., as index type for ..._array_type_node. (pushdecl): Avoid multiple extern decl mismatch warnings when previous decl is built-in. From-SVN: r3167
-rw-r--r--gcc/c-decl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a980e88..76f2272 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1820,7 +1820,9 @@ pushdecl (x)
else
decl = 0;
- if (decl && ! comptypes (TREE_TYPE (x), TREE_TYPE (decl)))
+ if (decl && ! comptypes (TREE_TYPE (x), TREE_TYPE (decl))
+ /* If old decl is built-in, we already warned if we should. */
+ && !DECL_BUILT_IN (decl))
{
pedwarn_with_decl (x,
"type mismatch with previous external decl");
@@ -2649,13 +2651,13 @@ init_decl_processing ()
With luck nothing will ever really depend on the length of this
array type. */
char_array_type_node
- = build_array_type (char_type_node, unsigned_char_type_node);
+ = build_array_type (char_type_node, unsigned_intQI_type_node);
/* Likewise for arrays of ints. */
int_array_type_node
- = build_array_type (integer_type_node, unsigned_char_type_node);
+ = build_array_type (integer_type_node, unsigned_intQI_type_node);
/* This is for wide string constants. */
wchar_array_type_node
- = build_array_type (wchar_type_node, unsigned_char_type_node);
+ = build_array_type (wchar_type_node, unsigned_intQI_type_node);
default_function_type
= build_function_type (integer_type_node, NULL_TREE);