diff options
author | raksit <raksit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-09 08:23:48 +0000 |
---|---|---|
committer | raksit <raksit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-09 08:23:48 +0000 |
commit | b5f30e7c2534814eff33964ebe728d8e7e825400 (patch) | |
tree | 52f1164b80ec03e33183a75b3810a57f8697a378 /gcc/flags.h | |
parent | 2a624fb1147d823e107c4c53a065de93e887a831 (diff) | |
download | gcc-b5f30e7c2534814eff33964ebe728d8e7e825400.tar.gz |
2008-07-09 Raksit Ashok <raksit@google.com>
* 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 <raksit@google.com>
* parser.c (cp_parser_postfix_expression): New warning based on flag
warn_disallowed_functions.
gcc/testsuite/ChangeLog
2008-07-09 Raksit Ashok <raksit@google.com>
* 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
Diffstat (limited to 'gcc/flags.h')
-rw-r--r-- | gcc/flags.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/flags.h b/gcc/flags.h index 1818a42c5ca..edc96e95920 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -279,6 +279,13 @@ extern bool flag_speculative_prefetching_set; instrumentation. */ extern bool flag_instrument_functions_exclude_p (tree fndecl); +/* Emit warning if the function call is disallowed under + -Wdisallowed-function-list=... */ +extern void warn_if_disallowed_function_p (const_tree fncall); + +/* True, if the -Wdisallowed-function-list=... option has been specified. */ +extern bool warn_disallowed_functions; + /* True if the given mode has a NaN representation and the treatment of NaN operands is important. Certain optimizations, such as folding x * 0 into 0, are not correct for NaN operands, and are normally |