Path: 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 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