- To: Daniel Frey <d.frey@xxxxxx>
- Subject: Re: attribute nonnull/expect_nonnull for return value?
- From: Ian Lance Taylor <iant@xxxxxxxxxx>
- Date: Sun, 25 Mar 2012 20:17:21 -0700
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- In-reply-to: <DDEC3936-7085-461C-AC35-B8945B3239C8@gmx.de> (Daniel Frey's message of "Sat, 24 Mar 2012 09:40:33 +0100")
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Daniel Frey <d.frey@xxxxxx> writes:
> GCC now knows that the arguments are nonnull, but how to I tell the
> compiler that the returned pointer is nonnull? Or if null is allowed
> but only the exception to the rule, I would like to tell the compiler
> that is should *expect* the pointer to be nonnull, but not disallow
> null. Actually, the second case is more important to me, but I think
> both should be possible.
At present, as far as I know, there is no way to do either.
Ian
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]