------- Comment #1 from burnus at gcc dot gnu dot org  2007-03-22 22:30 -------
Besides pointers, the same is also true for deallocated variables, only that
the unknown state does not exist. (Idea taken from 31318)

> I think there are essentially two problems possible with pointers:
> (a) Uninitialized pointer (i.e. neither NULL nor associated)
> (b) Using an unassociated pointer
> I think checking (a) is not easily doable as one would need to pass this 
> status (has been initialized? yes/no) on to subroutines.

(a) should be possible if one restricts oneself to restricts oneself to local
variables. If they are passed as actual argument to non-pointer (or
non-allocatable) dummies, this is also an error.

For allocatable variables the checking is always possible.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Run-time check using        |Run-time check using
                   |nullified pointers          |nullified pointers and
                   |                            |deallocated variables


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29616

Reply via email to