From: Christoph Mallon Date: Tue, 16 Sep 2008 18:38:09 +0000 (+0000) Subject: Warn about type qualifiers in the return type of function types. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8f50e4997976bf4942a75b96ec8489edd4202203;p=cparser Warn about type qualifiers in the return type of function types. [r22020] --- diff --git a/parser.c b/parser.c index e5fb27f..119677c 100644 --- a/parser.c +++ b/parser.c @@ -4167,6 +4167,10 @@ static type_t *construct_declarator_type(construct_type_t *construct_list, errorf(HERE, "function returning array is not allowed"); type = type_error_type; } else { + if (skipped_return_type->base.qualifiers != 0) { + warningf(HERE, + "type qualifiers in return type of function type are meaningless"); + } type = function_type; } break;