Steven Bosscher wrote:
> That is why I was looking at this. We have http://gcc.gnu.org/PR27336,
> and part of the fix could be to make the 'this' pointer always
> non-NULL. So far I haven't found anyone who can think of a situation
> where 'this' can be NULL...
It can't be NULL. (There are ways
On 4/28/06, Mark Mitchell <[EMAIL PROTECTED]> wrote:
Steven Bosscher wrote:
> The documentation of the nonnull attribute says:
>
> `nonnull (ARG-INDEX, ...)'
> The `nonnull' attribute specifies that some function parameters
> should be non-null pointers. For instance, the declaration:
Steven Bosscher wrote:
> The documentation of the nonnull attribute says:
>
> `nonnull (ARG-INDEX, ...)'
> The `nonnull' attribute specifies that some function parameters
> should be non-null pointers. For instance, the declaration:
>
> extern void *
> my_memcpy (v
Hello,
Consider the following test case:
struct A { bool g(int*, int*) __attribute__((nonnull (2))); };
bool A::g(int* a, int* b) {
if (a)
return 0;
return this;
}
G++ produces the following code for this snippet:
;; Function bool A::g(int*, int*) (_ZN1A1gEPiS0_)
bool A::g(int*, int*)