summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-08 22:33:46 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-08 22:33:46 +0000
commit7c772c9a1f35e89fff25d8200f20d1276dd3f1f1 (patch)
treed8ba494b63c0ae629f01eb15a7a2029026736c14 /gcc/c-typeck.c
parentcd7d360ca7315e42b4c609ed3c324f65229a44fd (diff)
downloadppe42-gcc-7c772c9a1f35e89fff25d8200f20d1276dd3f1f1.tar.gz
ppe42-gcc-7c772c9a1f35e89fff25d8200f20d1276dd3f1f1.zip
* c-decl.c (grokdeclarator): Make the TREE_TYPE for declarations
accurately reflect its cv-qualification. * c-typeck.c (type_lists_compatible_p): Ignore the top-levl cv-qualifiers on function types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43056 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 478ec43544b..5653ae59b68 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -651,7 +651,8 @@ type_lists_compatible_p (args1, args2)
if (simple_type_promotes_to (TREE_VALUE (args1)) != NULL_TREE)
return 0;
}
- else if (! (newval = comptypes (TREE_VALUE (args1), TREE_VALUE (args2))))
+ else if (! (newval = comptypes (TYPE_MAIN_VARIANT (TREE_VALUE (args1)),
+ TYPE_MAIN_VARIANT (TREE_VALUE (args2)))))
{
/* Allow wait (union {union wait *u; int *i} *)
and wait (union wait *) to be compatible. */
OpenPOWER on IntegriCloud