This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
you can (equality) compare a pointer to NULL -- which does not evenWell accurately, you can compare pointers, its not illegal, but the result of
happen to designate an object.
[...]null is a special case indeed, which can be reprsented using a distinguished offset
| One way to think about the semantic model is to consider pointers | in C to consist of a base/offset pair, where the base points to the | start of the object (some debugging checkout C compilers even | use such a format). Then operations on pointers need ONLY | reference the offset.
that model is too simplistic -- hint: null pointers.
-- Gaby
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |