PING: [PATCH: c++/diagnostic/18313] Warn for pointless qualifiers on return type
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Nov 29 08:20:00 GMT 2006
Dirk Mueller <dmuell@gmx.net> writes:
| On Tuesday, 28. November 2006 12:28, Gabriel Dos Reis wrote:
|
| > | If you have a better way to describe this behaviour, please tell me. I'd
| > | also be interested if the TREE_NO_WARNING on the type node has any
| > | undesired side-effect (there was none exposed by the testsuite).
| > But actually, we wanted to suppress the warning for that particular
| > decl, so we should be saying that. Do you think you can arrange for
| > the TREE_NO_WARNING be set on the FUNCTION_DECL (or maybe on its
| > DECL_RESULT I'm not sure which is better) instead of its type?
|
| I'm not 100% sure I understood you correctly, but the patch below works as
| well and survives bootstrap and regtest with no failures.
[...]
| @@ -8612,6 +8620,9 @@ grokdeclarator (const cp_declarator *dec
| if (!processing_template_decl)
| cp_apply_type_quals_to_decl (type_quals, decl);
|
| + if (set_no_warning)
| + TREE_NO_WARNING (decl) = 1;
| +
Yes, this does what I was suggesting. The revised patch if OK with
me. Thanks for your patience.
-- Gaby
More information about the Gcc-patches
mailing list