This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] __attribute__((nonnull))
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Jason R Thorpe <thorpej at wasabisystems dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 May 2002 00:53:18 +0100 (BST)
- Subject: Re: [PATCH] __attribute__((nonnull))
On Wed, 22 May 2002, Jason R Thorpe wrote:
> (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.
The functions nonnull_check_p and check_nonnull_arg need comments
explaining what they do.
It looks like, if a function has more than one nonnull attribute, only one
gets used for checking. While giving more than one such attribute to a
function may not be very useful - since multiple arguments can get
specified in one attribute - they should all be used if more than one is
given.
--
Joseph S. Myers
jsm28@cam.ac.uk