This is the mail archive of the 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]

PATCH: __attribute__((nonnull))

Marc Espie writes:
 > Wed Jan 12 02:08:26 CET 2000 Marc Espie	<>
 > 	* c-common.c (A_NONNULL):  New attribute.
 > 	(init_attribute):  Record A_NONNULL.
 > 	(record_function_format, record_international_format):  Remove.
 > 	(insert_function_attribute):  New, replacement for record_xxx.
 > 	(function_attribute_info, function_attributes_info):  New types.
 > 	(new_function_format, new_international_format, new_nonnull_info):
 > 	Corresponding constructors.
 > 	(decl_attributes):  Handle A_NONNULL, modify A_FORMAT and
 > 	A_FORMAT_ARG for new framework.
 > 	(function_format_info, international_format_info):  Fit with
 > 	function_attribute(s)_info.
 > 	(function_attribute_list):  New variable, replaces...
 > 	(function_format_list, international_format_list):  Remove.
 > 	(add_function_format):  New, helper for init_format_info.
 > 	(init_format_info):  Adjust format attributes.
 > 	(check_function_format):  Handle A_FORMAT and A_NONNULL attributes.
 > 	(find_function_attribute, reduce_pointer):  New.
 > 	(check_nonnull_info):  New, check A_NONNULL.
 > 	(check_format_info):  Use helper functions, remove non-null pointer
 > 	checks.
 > 	* extend.texi: Document nonnull.

I would like to see the doc for this improved, but otherwise this is
fine.  Thanks, and please check it in.

The doc is not clear about what the nonnull attribute actually does.
It is not clear about what it does on non-pointer types, or what if
anything it does about non-constant actual arguments.

Sorry I took so long to get to this.


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