const comparison in C and C++
William E. Davidsen Jr
davidsen at steinmetz.ge.com
Wed Sep 21 01:43:28 AEST 1988
In article <782 at proxftl.UUCP> bill at proxftl.UUCP (T. William Wells) writes:
| :
| : const volatile int * const clock; /* clock is a readonly pointer to */
| : /* a readonly and volatile int */
|
| Almost. As specified, it is not initialized and so contains a
| null pointer. You should initialize it to the right address.
Am I misreading the standard? My interpretation was that uninitialized
global storage was set to *all bit zero* and that there was something
that mentioned this might not be zero for types other than integral
types. Is the compiler and linker path really supposed to initialize
this to a null pointer (as in zero cast to a pointer)? On some machines
the NULL pointer isn't all bits off, for sure.
--
bill davidsen (wedu at ge-crd.arpa)
{uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me
More information about the Comp.lang.c
mailing list