Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/13/11 09:26
Read: times


 
#180547 - No guarantee that a NULL pointer points to any memory
Responding to: ???'s previous message
Per Westermark said:
0 is a synonym for NULL.

Yes - in the context of pointers:

ISO/IEC 9899:1990 said:
6.2.2.3 Pointers
An integral constant expression with the value 0 ... is called a null pointer constant.


Per Westermark said:
the standard doesn't guarantee that a NULL pointer points to any memory range at all.

Correct.

In fact, the Standard just requires that a NULL pointer points to nothing valid at all within the program:

ISO/IEC 9899:1990 said:
6.2.2.3 Pointers
a null pointer is guaranteed to compare unequal to a pointer to any object or function



List of 25 messages in thread
TopicAuthorDate
sdcc internal error / C syntax            01/01/70 00:00      
   legality of indexing NULL pointer            01/01/70 00:00      
      bug            01/01/70 00:00      
         version            01/01/70 00:00      
            version revisited            01/01/70 00:00      
               thank you            01/01/70 00:00      
                  Fixed            01/01/70 00:00      
                     no snapshot            01/01/70 00:00      
                        works            01/01/70 00:00      
                           0 is special - but so is NULL. indexing around NULL is bad            01/01/70 00:00      
                              No guarantee that a NULL pointer points to any memory            01/01/70 00:00      
            time            01/01/70 00:00      
               I know :-(            01/01/70 00:00      
       Use of __at ?            01/01/70 00:00      
         What is "that way"?            01/01/70 00:00      
            the antique version....            01/01/70 00:00      
            XBYTE macro            01/01/70 00:00      
               Okay, then the following definition...            01/01/70 00:00      
                  RE: David's remarks about volatility            01/01/70 00:00      
   Close, but no cigar            01/01/70 00:00      
   Avoid the 'volatile'            01/01/70 00:00      
      instead of offsetting...            01/01/70 00:00      
         Dereferencing a '_REG            01/01/70 00:00      
            I agree            01/01/70 00:00      
      Use of __at ? [ed]            01/01/70 00:00      

Back to Subject List