certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] IEEE1516 RIambassador Checking if (&Object == NULL)


From: Eric Noulard
Subject: Re: [certi-dev] IEEE1516 RIambassador Checking if (&Object == NULL)
Date: Thu, 11 Nov 2010 19:13:50 +0100

2010/11/11 Ijperen, Jeroen van <address@hidden>:
> Hello Eric,
>
> You are right that a (const) reference *should* always refer to an object, 
> however this is not enforced by the compiler or runtime. So it actually is 
> possible to dereference a NULL pointer, and pass it as a reference. (To check 
> for this situation, you request the location of the reference, and compare it 
> to NULL.) Basically, it's an extra check to make really sure no one passes a 
> NULL tag (accidentally or on purpose).

In fact I think the extra-check is useless;
http://www.velocityreviews.com/forums/t285972-null-reference.html

I think shall remove it before next release.

May be I'm missing something so you can send me an example on
how to "to dereference a NULL pointer, and pass it as a reference"
without making the compiler cry :-]


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]