Optimization of conditional access to globals: thread-unsafe?

Robert Dewar dewar@adacore.com
Mon Oct 29 12:14:00 GMT 2007


Darryl Miles wrote:

> This then leads into the question.  Is a pointer allowed to be invalid.
> 
> I'm sure I have read a comment on this before, along the line of the 
> spec says it must be valid or a certain number of other values (like 
> zero or one past being valid).  But I can not cite chapter and verse if 
> this is true.

Well most certainly it can be null, and the code sequence in question
could just be testing a pointer for being null, that's certainly very
common code, and in fact I don't see why this won't cause trouble???



More information about the Gcc mailing list