Hi, This patch attempts to add returns_arg attribute for c-family languages. For C++ methods, first arg is assumed to be this pointer, similar to alloc_size. I have a couple of doubts: (a) I am not sure why DECL_ARGUMENTS (decl) in handle_returns_arg_attribute returns NULL ? My intent was to check that the return-type and argument-types are compatible. (b) AFAIU the bottom two bits of call return flags are used for storing args from 0 - 3 and the arg number can be obtained by masking with ERF_RETURN_ARG_MASK. So, does that mean we can only allow first 4 arguments to be annotated with returns_arg attribute ? In the patch, I use fn_spec ('argnum'), which gimple_call_return_flags uses to mark the corresponding arg with ERF_RETURN_ARG: (c) How to write dejaGNU test to check if fn_spec ('argnum') has been correctly applied to the corresponding parameter ? In the patch, I am just testing for validation. Thanks, Prathamesh