From b5f30e7c2534814eff33964ebe728d8e7e825400 Mon Sep 17 00:00:00 2001 From: raksit Date: Wed, 9 Jul 2008 08:23:48 +0000 Subject: 2008-07-09 Raksit Ashok * doc/invoke.texi (Option Summary): Mention new option -Wdisallowed-function-list=... (Warning Options): Document -Wdisallowed-function-list=... * common.opt (Wdisallowed-function-list=): New flag. * flags.h (warn_disallowed_functions): External definition of new boolean warning flag. (warn_if_disallowed_function_p): Declare new function. * opts.c (warning_disallowed_functions): New static variable. (warn_disallowed_functions): New boolean warning flag. (warn_if_disallowed_function_p): New function. (add_comma_separated_to_vector): Rename add_instrument_functions_exclude_list to this. (common_handle_option): Handle new option. Rename calls to add_instrument_functions_exclude_list into calls to add_comma_separated_to_vector. * c-parser.c (c_parser_postfix_expression_after_primary): New warning based on flag warn_disallowed_functions. gcc/cp/ChangeLog 2008-07-09 Raksit Ashok * parser.c (cp_parser_postfix_expression): New warning based on flag warn_disallowed_functions. gcc/testsuite/ChangeLog 2008-07-09 Raksit Ashok * gcc.dg/wdisallowed-functions-1.c: New test. * gcc.dg/wdisallowed-functions-2.c: New test. * g++.dg/warn/Wdisallowed-functions-1.C: New test. * g++.dg/warn/Wdisallowed-functions-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137655 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/c-parser.c') diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 45aff80d6c0..4ca06fec414 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -5630,6 +5630,8 @@ c_parser_postfix_expression_after_primary (c_parser *parser, "expected %<)%>"); expr.value = build_function_call (expr.value, exprlist); expr.original_code = ERROR_MARK; + if (warn_disallowed_functions) + warn_if_disallowed_function_p (expr.value); break; case CPP_DOT: /* Structure element reference. */ -- cgit v1.2.1