Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: function declaration without args no longer works
Date: Wed, 29 Apr 2026 16:43:29 -0700
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <867bpp1gf2.fsf@linuxsc.com>
References: <10sl5na$5ov$1@reader1.panix.com> <10sl7m8$3du1$1@artemis.inf.ed.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Wed, 29 Apr 2026 23:43:32 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="43c851be6dd2938b63d54cae32dcc1b4"; logging-data="303263"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FQM/k2pbdfw/ZavHE6QQWhM5+XgZQHlo="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:qbCo9MDNSGJGjIpjpmEUKX37U8k= sha1:uBnFgfQjIwa112KuZ4iJ71O2qJk=
Xref: csiph.com comp.lang.c:398100
richard@cogsci.ed.ac.uk (Richard Tobin) writes:
> In article <10sl5na$5ov$1@reader1.panix.com>,
> John Forkosh wrote:
>
>> New slackware install with gcc --version 15.2.0 throws
>> errors like
>> typer.c:9:3: error: too many arguments to function typer;
>> expected 0, have 1
>> 9 | typer(input);
>> | ^~~~~ ~~~~~
>> when compiling a program that used to compile without warnings
>> (even when using --pedantic) on earlier versions.
>
> K&R style function declarations have long been deprecated, [...]
No, they haven't. Earlier editions of the C standard designated
such declarations (and hence also definitions) as obsolescent,
not deprecated, and the meaning is very different. In particular,
the C standard defines "obsolescent" as "may be considered for
removal in a future standard" (wording quoted from memory only).
Not "will be removed" but "may be /considered for removal/". And
indeed some items designated as obsolescent in earlier standards
had their obsolescence-ness removed in a later standard.