Article View: comp.std.c++
Article #209Re: null references & dereferencing null pointers
From: Henry Spencer
Date: Wed, 01 Aug 1990 17:05
Date: Wed, 01 Aug 1990 17:05
15 lines
1103 bytes
1103 bytes
In article <RLS.90Jul31125458@onondaga.steinmetz.ge.com> rls@onondaga.steinmetz.ge.com (Rod Sprattling) writes: > >One use for dereferencing null pointers leaps to mind. Consider this >definition, used in Intrinsics-based widgets in the X Window System: > >#define XtOffset(type,field) \ ... The correct way to deal with this is with ANSI C's `offsetof' macro, which can do whatever magic is necessary in a particular implementation. That is, there is no need to invent a solution -- e.g. allowing null dereferencing -- for this problem, it has already been solved. -- The 486 is to a modern CPU as a Jules | Henry Spencer at U of Toronto Zoology Verne reprint is to a modern SF novel. | henry@zoo.toronto.edu utzoo!henry
Technical Details
Message-ID:
<1990Aug1.170554.21854@zoo.toronto.edu>Path:
arc1-ca.pugleaf.net!utzoo!henryReferences:
<56159@microsoft.UUCP> <RLS.90Jul31125458@onondaga.steinmetz.ge.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: null references & dereferencing null pointers Message-ID: <1990Aug1.170554.21854@zoo.toronto.edu> Organization: U of Toronto Zoology References: <56159@microsoft.UUCP> <RLS.90Jul31125458@onondaga.steinmetz.ge.com> Date: Wed, 1 Aug 90 17:05:54 GMT