[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] non-null declarations
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] non-null declarations |
Date: |
Sat, 12 Dec 2009 08:54:31 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hi Bruno,
Bruno Haible writes:
>
> > Potential drawback of this approach is that these declarations may affect
> > the implementation as well: there is a risk that compiler may optimize out
> > NULL checks. In other projects where this issue arose before it was
> > worked around by disabling non-null declarations in implementation scope.
>
> I'm glad you mention this. Indeed, the gcc doc says
> "The compiler may also choose to make optimizations based
> on the knowledge that certain function arguments will not be null."
thanks for all your work on this!
You might want to compile gnulib with -fno-delete-null-pointer-checks for
compilers that understand this flag.
Cheers,
Ralf
- Re: [PATCH] non-null declarations, (continued)
Re: [PATCH] non-null declarations, Bruno Haible, 2009/12/10
Re: non-null declarations, recvfrom, sendto, Bruno Haible, 2009/12/10
Re: non-null declarations, recvfrom, sendto, Paolo Bonzini, 2009/12/10
Re: [PATCH] non-null declarations, Dmitry V. Levin, 2009/12/10
Re: [PATCH] non-null declarations, Bruno Haible, 2009/12/10