🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3254

Re: gcc and NULL function pointers.

#3254
From: Chuck Karish
Date: Fri, 28 Jun 1991 22:43
19 lines
1286 bytes
In article <20969@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com
(Christopher R Volpe) writes:
>I believe the following is true:
>
>(1) The following code is strictly conforming:
>  struct foo *fooptr = NULL;
>
>(2) The following code requires a diagnostic:
>  struct foo *fooptr = (char *)0;

Is there a restriction that would prevent the implementation
from producing a diagnostic for (1)?  I wouldn't be surprised
to see either  "possible pointer type mismatch" or "illegal
combination of pointer and integer", depending on how NULL is
defined.
-- 

	Chuck Karish		karish@mindcraft.com
	Mindcraft, Inc.		(415) 323-9000
Technical Details
Message-ID: <678149027.20102@mindcraft.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ames!mindcraft.com!karish
References: <25572@well.sf.ca.us> <1146.Jun2221.20.2291@kramden.acf.nyu.edu> <16506@smoke.brl.mil> <17605.Jun2607.39.3591@kramden.acf.nyu.edu> <1991Jun27.001642.10658@tkou02.enet.dec.com> <20969@crdgw1.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ames!mindcraft.com!karish
From: karish@mindcraft.com (Chuck Karish)
Newsgroups: comp.std.c
Subject: Re: gcc and NULL function pointers.
Message-ID: <678149027.20102@mindcraft.com>
Date: 28 Jun 91 22:43:44 GMT
References: <25572@well.sf.ca.us> <1146.Jun2221.20.2291@kramden.acf.nyu.edu> <16506@smoke.brl.mil> <17605.Jun2607.39.3591@kramden.acf.nyu.edu> <1991Jun27.001642.10658@tkou02.enet.dec.com> <20969@crdgw1.crd.ge.com>
Organization: Mindcraft, Inc.
Lines: 19