Deutsch   English   Français   Italiano  
<v4oi9f$gnf3$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Whaddaya think?
Date: Mon, 17 Jun 2024 07:41:01 +0200
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <v4oi9f$gnf3$1@dont-email.me>
References: <666ded36$0$958$882e4bbb@reader.netnews.com>
 <20240616015649.000051a0@yahoo.com> <v4lm16$3s87h$4@dont-email.me>
 <v4lmso$3sl7n$1@dont-email.me> <v4lr0m$3tbpj$1@dont-email.me>
 <8734pd4g3s.fsf@nosuchdomain.example.com> <v4ltuj$3trj2$1@dont-email.me>
 <87y17530a0.fsf@nosuchdomain.example.com> <v4mb92$3ak$1@dont-email.me>
 <87tths39yy.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 17 Jun 2024 07:41:03 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ce947dcd9ea98bb3504b70234e0c429c";
	logging-data="548323"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/LBcDcE/K57oscTvLfOsiC"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:Ehh287NYUAynIWF6OGiveZz3IgQ=
In-Reply-To: <87tths39yy.fsf@nosuchdomain.example.com>
X-Enigmail-Draft-Status: N1110
Bytes: 2381

On 16.06.2024 22:32, Keith Thompson wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>> [...] K&R at
>> least seems to say that 'void' can only be declared for the
>> return type of functions that do not return anything.
>> [...]
> 
> No version of C has ever permitted "void main" except when an
> implementation documents and permits it.  [...]

I cannot comment on main() being handled differently than
other C functions. I was just quoting my old copy of K&R.

I don't understand what you mean with "no version of C has
ever permitted", given that my C compiler doesn't complain.

WRT return value to the environment I'd expect any random
or arbitrary value being returned in case that non had been
explicitly specified to be returned.

If I want a defined exit status (which is what I usually
want) I specify 'int main (...)' and provide an explicit
return statement (or exit() call).

Janis