diff options
author | Raksit Ashok <raksit@google.com> | 2008-07-09 08:23:48 +0000 |
---|---|---|
committer | Raksit Ashok <raksit@gcc.gnu.org> | 2008-07-09 08:23:48 +0000 |
commit | 1ebc7e681079e61300e75a5c0f3b2da335720cc7 (patch) | |
tree | 52f1164b80ec03e33183a75b3810a57f8697a378 /gcc/cp | |
parent | 47d268d0d33fbf5dbcd7d022c87e1dfcb6b61577 (diff) | |
download | gcc-1ebc7e681079e61300e75a5c0f3b2da335720cc7.zip gcc-1ebc7e681079e61300e75a5c0f3b2da335720cc7.tar.gz gcc-1ebc7e681079e61300e75a5c0f3b2da335720cc7.tar.bz2 |
invoke.texi (Option Summary): Mention new option -Wdisallowed-function-list=...
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.
From-SVN: r137655
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 75435cf..fa4419e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-09 Raksit Ashok <raksit@google.com> + + * parser.c (cp_parser_postfix_expression): New warning based on flag + warn_disallowed_functions. + 2008-07-08 Simon Martin <simartin@users.sourceforge.net> PR c++/34963 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2323c67..767d14d 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -4725,6 +4725,9 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, koenig_p, tf_warning_or_error); + if (warn_disallowed_functions) + warn_if_disallowed_function_p (postfix_expression); + /* The POSTFIX_EXPRESSION is certainly no longer an id. */ idk = CP_ID_KIND_NONE; } |