🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3259

Re: gcc and NULL function pointers.

#3259
From: Doug Gwyn
Date: Sat, 29 Jun 1991 05:24
18 lines
1437 bytes
In article <678149027.20102@mindcraft.com> karish@mindcraft.com (Chuck Karish) writes:
>Is there a restriction that would prevent the implementation
>from producing a diagnostic for (1)?

Literally speaking, an implementation can generate spurious diagnostics
if it wishes.  However, there is supposed to be a well-defined notion of
"accepting" a strictly conforming program, and such a diagnostic if it
is indeed generated should be syntactically distinguishable from a real
diagnostic (such as the ones required by the standard).

>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.

Why in the world not?  All conforming implementations must define NULL
such that example (1), after NULL is macro replaced, is a strictly
conforming excerpt.  Why would they generate diagnostics for perfectly
fine code?
Technical Details
Message-ID: <16583@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!rex!ukma!hsdndev!cmcl2!adm!smoke!gwyn
References: <1991Jun27.001642.10658@tkou02.enet.dec.com> <20969@crdgw1.crd.ge.com> <678149027.20102@mindcraft.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!rex!ukma!hsdndev!cmcl2!adm!smoke!gwyn
From: gwyn@smoke.brl.mil (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: gcc and NULL function pointers.
Message-ID: <16583@smoke.brl.mil>
Date: 29 Jun 91 05:24:51 GMT
Article-I.D.: smoke.16583
References: <1991Jun27.001642.10658@tkou02.enet.dec.com> <20969@crdgw1.crd.ge.com> <678149027.20102@mindcraft.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 18