Article View: comp.std.c
Article #4487Re: Is a compiler diagnostic required?
From: Christopher R. Volpe
Date: Fri, 15 Dec 1995 14:17
Date: Fri, 15 Dec 1995 14:17
35 lines
1710 bytes
1710 bytes
In article <4aq3l4$g39@newshost.lanl.gov>, tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) writes:
|>In article <4apkr7$8sp@rdsunx.crd.ge.com>, volpe@bart.crd.ge.com (Christopher
|>R. Volpe) writes:
|>|> In article <4apgml$98i@newshost.lanl.gov>, tanmoy@qcd.lanl.gov (Tanmoy
|>Bhattacharya) writes:
|>|> |>Is a compiler required to diagnose the mismatch of parameter types:
|>|> |>
|>|> |>void f(va_list*);
|>|> |>void g(int x,...) {
|>|> |> va_list y;
|>|> |> va_start (y,x);
|>|> |> f(y);
|>|> |> va_end(y);
|>|> |>}
|>|> |>
|>|> |>Or can the implementation allow it without warning?
|>|> |>
|>|> |>(Consider va_list == void* for example of why an implementation may want
|>to
|>|> |>do it).
|>|> |>
|>|>
|>|> Why would you want an implementation to allow you to pass a void* to a
|>|> function declared to take a void**?
|>
|>Because with a prototype in scope, void* automatically gets _converted_ to
|>the right type: an explicit cast is not required.
I need a cup of coffee. Nevermind.
--
Chris Volpe Phone: (518) 387-7766 (Dial Comm 8*833
GE Corporate R&D Fax: (518) 387-6560
PO Box 8, Schenectady, NY 12301 Email: volpecr@crd.ge.com
Technical Details
Message-ID:
<4as01u$h1l@rdsunx.crd.ge.com>Path:
arc1-ca.pugleaf.net!bart.crd.ge.com!volpeReferences:
<4apgml$98i@newshost.lanl.gov> <4apkr7$8sp@rdsunx.crd.ge.com> <4aq3l4$g39@newshost.lanl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!bart.crd.ge.com!volpe From: volpe@bart.crd.ge.com (Christopher R. Volpe) Newsgroups: comp.std.c Subject: Re: Is a compiler diagnostic required? Date: 15 Dec 1995 14:17:34 GMT Organization: GE Corporate Research & Development Sender: volpe@bart (Christopher R. Volpe) Distribution: world Message-ID: <4as01u$h1l@rdsunx.crd.ge.com> References: <4apgml$98i@newshost.lanl.gov> <4apkr7$8sp@rdsunx.crd.ge.com> <4aq3l4$g39@newshost.lanl.gov> Reply-To: volpe@ausable.crd.ge.com NNTP-Posting-Host: bart.crd.ge.com