Deutsch   English   Français   Italiano  
<86ikrylrrf.fsf@linuxsc.com>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: question about linker
Date: Wed, 04 Dec 2024 19:42:44 -0800
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <86ikrylrrf.fsf@linuxsc.com>
References: <vi54e9$3ie0o$1@dont-email.me> <20241129142810.00007920@yahoo.com> <vicfra$13nl4$1@dont-email.me> <20241129161517.000010b8@yahoo.com> <vicque$15ium$2@dont-email.me> <vid110$16hte$1@dont-email.me> <87mshhsrr0.fsf@nosuchdomain.example.com> <vidd2a$18k9j$1@dont-email.me> <8734j9sj0f.fsf@nosuchdomain.example.com> <vihhkj$2er60$1@dont-email.me> <vihjaj$2f79m$2@dont-email.me> <vihs4s$2hgg1$2@dont-email.me> <20241201185740.00004c30@yahoo.com> <viia55$2mrc9$1@dont-email.me> <vinftq$2sv5n$1@paganini.bofh.team> <20241204135653.00004f01@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 05 Dec 2024 04:42:45 +0100 (CET)
Injection-Info: dont-email.me; posting-host="8a263e9b473304506e7d265d71d931f0";
	logging-data="1461718"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+dwGQbubbba5AbrolB/hSVX4dLb4kge40="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:GEWL1iWxH5xiHFOzxsIj9EEU3X0=
	sha1:bRs8Rnun8h9FrsRTceRRxo/1mbk=
Bytes: 2147

Michael S <already5chosen@yahoo.com> writes:

[on adding a rule to the C standard so functions defined
with a prototype anywhere in a file cause those functions'
types available throughout the same file]

> No, I am afraid of cases where function is used without prototype and
> then there is conflicting definition later in the module.
> Of course, it's UB, but in practice it could often work fine.
> Something like that:
>
> static int bar();
> int foo(void)
> {
>   return bar(42);
> }
>
> static int bar(int a, int b)
> {
>   if (a == 42)
>     return -1;
>   return a - b;
> }

As history-breaking changes go, this one seems about as
benign as one could hope.  Clearly a win IMO.