This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]