Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Set the result of void function Date: Thu, 28 Sep 2017 13:55:19 -0700 Organization: None to speak of Lines: 23 Message-ID: References: <74b5ddce-96ec-48aa-a16c-a5a4207c17fe@googlegroups.com> <9546ff45-2666-4f32-8905-8d4baba8a74d@googlegroups.com> <877ewm1ook.fsf@bsb.me.uk> <65ac971c-10a1-41b1-876d-cdded04ea432@googlegroups.com> <6308c8a5-6a1e-4667-bac4-1cdaf18e7e55@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="f02d66d70d400004528cf8384483c39b"; logging-data="1082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//9LZJVKvws9Vxud0LdLTz" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:XBRli/kB9ccixsInlSXpeYMWHuM= sha1:qdWK3lpDNhr8Iu9kW4w9kWEVoYA= Xref: csiph.com comp.lang.c:120494 bartc writes: > On 28/09/2017 20:57, David Brown wrote: >> On 28/09/17 18:39, bartc wrote: [...] >>> Only DMC reports an error in the above. >> >> It is not an error, so why should it? > > Look at the code again. Are you seriously telling me that passing a > string to a function, then passing a float to the same function, is not > an error? We are seriously telling you that the behavior is undefined, that the C standard does not require a diagnostic, and that the problem is easily avoided by consistent use of prototypes. Do you not believe us? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"