This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/20318] RFE: add attribute to specify that a function never returns NULL
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2005 14:20:20 -0000
- Subject: [Bug c/20318] RFE: add attribute to specify that a function never returns NULL
- References: <20050304153241.20318.jorton@redhat.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-03 14:20 -------
Here is a reduced testcase for the SVN code:
void *g();
static void *count_and_verify_instructions(int *ninst,const unsigned char *p)
{
if (p == ((void *)0))
return g();
*ninst = 0;
return 0;
}
void f(int);
void *decode_window(const unsigned char *data)
{
int ninst;
void *svn_err__temp = count_and_verify_instructions(&ninst, data);
if (svn_err__temp)
return svn_err__temp;
f (ninst);
return 0;
}
----- cut ---------
g returns only non null values.
This reduced testcase comes from PR 21320 which comes from OLH.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-03-04 15:38:22 |2005-06-03 14:20:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20318