aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-05-08 17:56:12 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-05-08 17:56:12 -0400
commitd949d5dfde30fe2393ce4c7fd87e3fc6d073f075 (patch)
treeb633689e9d008ec6f5a48844bf56a97506e74e37 /gcc
parent1907795ecd90e87e56e57c73c293ee8d86cbdc6f (diff)
downloadgcc-d949d5dfde30fe2393ce4c7fd87e3fc6d073f075.zip
gcc-d949d5dfde30fe2393ce4c7fd87e3fc6d073f075.tar.gz
gcc-d949d5dfde30fe2393ce4c7fd87e3fc6d073f075.tar.bz2
(convert_for_assignment): Don't give errors about adding const or
volatile unless both sides point to functions. From-SVN: r9590
Diffstat (limited to 'gcc')
-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 4570040..370ef39 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -4052,7 +4052,8 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum)
warn_for_assignment ("pointer targets in %s differ in signedness",
get_spelling (errtype), funname, parmnum);
}
- else
+ else if (TREE_CODE (ttl) == FUNCTION_TYPE
+ && TREE_CODE (ttr) == FUNCTION_TYPE)
{
/* Because const and volatile on functions are restrictions
that say the function will not do certain things,