From ccf08a6ed7ade866dab79e1c0dc853bae887f9e2 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 3 May 2005 13:55:46 -0400 Subject: c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed. * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed. * calls.c (expand_call): Likewise. * function.c (init-function_start): Likewise. * common.opt (-fdiagnostics-show-option): New. * opts.c (option_enabled): Accept the option index instead of a pointer to the option descriptor. * opts.h (option_enabled): Likewise. * toplev.c (print_switch_values): Pass option index, not option descriptor. * diagnostic.h (diagnostic_info): Add option_index. * diagnostic.c: Include opts.h. (diagnostic_set_info): Initialize option_index. (diagnostic_report_diagnostic): Amend option name if appropriate. (warning): Check to see if the specified warning is enabled. Store option index. * doc/invoke.texi (-fdiagnostics-show-options): Document. From-SVN: r99169 --- gcc/calls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index 2739832..b26e873 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1934,8 +1934,8 @@ expand_call (tree exp, rtx target, int ignore) /* Warn if this value is an aggregate type, regardless of which calling convention we are using for it. */ - if (warn_aggregate_return && AGGREGATE_TYPE_P (TREE_TYPE (exp))) - warning (0, "function call has aggregate value"); + if (AGGREGATE_TYPE_P (TREE_TYPE (exp))) + warning (OPT_Waggregate_return, "function call has aggregate value"); /* If the result of a pure or const function call is ignored (or void), and none of its arguments are volatile, we can avoid expanding the -- cgit v1.1