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: Wed, 27 Sep 2017 12:26:48 -0700 Organization: None to speak of Lines: 52 Message-ID: References: <2919fc6f-baa8-4ff0-a035-94ce965bd8b8@googlegroups.com> <64ff1352-b75f-4540-81c2-87bf3e9e9a8e@googlegroups.com> <9385280a-5d3c-4d17-9348-e2af3053282d@googlegroups.com> <8c29ee78-bc72-41b4-8c06-880f15ebd63e@googlegroups.com> <001b7bdd-f28a-4747-80da-81404481b320@googlegroups.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="c4326c8a8501fb80bdc9708804691d40"; logging-data="24886"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CbmFngE9Sb9uBnm+X4lKa" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:fYdJdRPOzFbsbdRuAvBqse+60F8= sha1:qwAi5lJu5muUzBnt/muFDD/Yq1Y= Xref: csiph.com comp.lang.c:120403 bartc writes: > On 27/09/2017 19:06, Keith Thompson wrote: >> bartc writes: > >> gcc, for example, issues a non-fatal warning by default, but it can >> easily be invoked in a mode (using "-pedantic-errors") that makes >> it a fatal error. >> >> The fact that required diagnostics need not be fatal has been >> discussed here repeatedly. I suggest you save or bookmark this >> answer so you don't have to ask again. > > What's that go to do anything? It's a direct answer to a question that you asked, and have now snipped. Here's what you wrote: It should absolutely be a hard error. (Unless someone can explain to me how such a thing can be just a warning.) I took that last parenthesized sentence fragment as a question. I explained how such a thing can be just a warning. That's what it's got to do with anything. > You contracted someone by saying C does has 'subroutines' in the form of > functions. Contradicted, but yes. > I said those don't count, partly because the language allows a compiler > to not implement them rigorously. > > Therefore C doesn't properly enforce the concept of subroutines; it > makes it optional. > > Does C have subroutines? It depends... If I understand you correctly, you think that the fact that a conforming C compiler need not treat `return 42;` in a void function as a fatal error means that a void function is not a subroutine. I find that absurd. I can't wait to see where the goalposts end up on your next followup. -- 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"