summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 21:01:47 +0000
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 21:01:47 +0000
commit10fda9eb3b1584ac33daaf1f7cdcc950f836adbf (patch)
tree8e733d5b7a3ce8d9267f4f50ab0923c79cbd51f2 /gcc/c-typeck.c
parent90d092db65eb841cd897c8c1e59cd624e34b765c (diff)
downloadppe42-gcc-10fda9eb3b1584ac33daaf1f7cdcc950f836adbf.tar.gz
ppe42-gcc-10fda9eb3b1584ac33daaf1f7cdcc950f836adbf.zip
Target Hook to issue diagnostics for AltiVec argument to funtion
with unknown prototype. OKed by Mark Mitchel. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96124 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 24bd0794188..9c94b034b6a 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -2122,6 +2122,7 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl)
tree val = TREE_VALUE (valtail);
tree rname = function;
int argnum = parmnum + 1;
+ const char *invalid_func_diag;
if (type == void_type_node)
{
@@ -2273,6 +2274,12 @@ convert_arguments (tree typelist, tree values, tree function, tree fundecl)
< TYPE_PRECISION (double_type_node)))
/* Convert `float' to `double'. */
result = tree_cons (NULL_TREE, convert (double_type_node, val), result);
+ else if ((invalid_func_diag =
+ targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val)))
+ {
+ error (invalid_func_diag);
+ return error_mark_node;
+ }
else
/* Convert `short' and `char' to full-size `int'. */
result = tree_cons (NULL_TREE, default_conversion (val), result);
OpenPOWER on IntegriCloud