]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-common.c
c-common.c (warn_nonnull): Declare.
authorJason Thorpe <thorpej@wasabisystems.com>
Thu, 23 May 2002 15:48:05 +0000 (15:48 +0000)
committerJason Thorpe <thorpej@gcc.gnu.org>
Thu, 23 May 2002 15:48:05 +0000 (15:48 +0000)
commitb34c78814983ef7dcb1b6baacb335836c960ac15
treeec1ff9d3e5c1ac88998d2453691cca3c42bc0416
parent9547983155087b81454e9149ad37c2945f8137b9
c-common.c (warn_nonnull): Declare.

* c-common.c (warn_nonnull): Declare.
(c_common_attribute_table): Add "nonnull" attribute.
(handle_nonnull_attribute, check_function_nonnull, nonnull_check_p,
check_nonnull_arg, get_nonnull_operand, check_function_arguments,
check_function_arguments_recurse): New functions.
* c-common.h (warn_nonnull): Declare extern.
(check_function_arguments, check_function_arguments_recurse): New
prototypes.
* c-decl.c (c_decode_option): Add -Wnonnull option.
* c-format.c (set_Wformat): Set warn_nonnull if enabling
format checking.
(format_check_context): New structure.
(check_format_info_recurse): Remove recursion and rename to...
(check_format_arg): ...this.  Update comment.
(check_format_info): Use check_function_arguments_recurse.
* c-typeck.c (build_function_call): Call check_function_arguments
instead of check_function_format.
* doc/extend.texi: Document "nonnull" attribute.
* doc/invoke.texi: Docuemnt -Wnonnull option.
* testsuite/gcc.dg/nonnull-1.c: New test.
* testsuite/gcc.dg/nonnull-2.c: New test.

From-SVN: r53790
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/c-format.c
gcc/c-typeck.c
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/gcc.dg/nonnull-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/nonnull-2.c [new file with mode: 0644]