This is the mail archive of the gcc@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: Couldn't `function(arg[static 3])` imply nonnull and array size in C?


On 04/05/15 07:40, Martin Uecker wrote:

BTW: Why is 'nonnull' a function attribute and not something
which can be attached to pointer types?

I think this is something wanted for a long time:

https://gcc.gnu.org/ml/gcc/2006-04/msg00550.html

but nobody has implemented it yet. Perhaps there was some technical hurdle in the past, probably long gone.

Clang has implemented this variation already sometime ago:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140203/098497.html

so there is a precedent.

Cheers,

Manuel.


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