Groups | Search | Server Info | Login | Register


Groups > comp.lang.c > #398099

Re: function declaration without args no longer works

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: function declaration without args no longer works
Date Wed, 29 Apr 2026 16:32:51 -0700
Organization A noiseless patient Spider
Lines 63
Message-ID <86bjf11gws.fsf@linuxsc.com> (permalink)
References <10sl5na$5ov$1@reader1.panix.com> <20260426175044.000062ff@yahoo.com> <10slf3h$mho$3@reader1.panix.com> <10smamp$1vlj2$2@dont-email.me> <10smvq5$25a7q$2@dont-email.me> <10spm2q$5fq$1@reader1.panix.com> <10spqdr$2vs2g$1@dont-email.me> <10ss83f$c4t$1@reader1.panix.com> <10ssb73$3mum2$1@dont-email.me> <20260429112553.00006835@yahoo.com> <10ssl5f$3qhoh$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Wed, 29 Apr 2026 23:32:52 +0000 (UTC)
Injection-Info dont-email.me; posting-host="43c851be6dd2938b63d54cae32dcc1b4"; logging-data="303263"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7qRA7zTvOF2t0TuM+gYaCLUorDcCkvbw="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:V6pWguQgT7ezlspANT+DghRHUMQ= sha1:Cc6vO/SC4KDiUya3iBqHS0iEkvM=
Xref csiph.com comp.lang.c:398099

Show key headers only | View raw


Bart <bc@freeuk.com> writes:

> On 29/04/2026 09:25, Michael S wrote:
>
>> On Wed, 29 Apr 2026 09:15:47 +0200
>> David Brown <david.brown@hesbynett.no> wrote:
>>
>>> Other people have been using function prototypes for the last 30
>>> years of C programming.  You don't need to be working in a vacuum to
>>> see C99 code.  And while consistency of coding style and standard
>>> level is absolutely an important consideration when maintaining or
>>> modifying existing code, it is a /consideration/ - not an absolute.
>>> If I am making small changes to a piece of old C90 code, I'll use
>>> C90, but if I am spending a lot of time working on a big
>>> modification, and there are no other overriding requirements, I'll
>>> write the new stuff in a better style.
>>>
>>>> But the world I see is full of pre-existing
>>>> complications that frequently can't be precisely predicted, and
>>>> that often can affect your choice of coding style.  Better to be
>>>> conservative and safe than flamboyant and sorry.  (Not saying
>>>> your suggestions are flamboyant, but the sentence sounded
>>>> cuter that way:)
>>>
>>> Modern C lets you write better C - clearer, safer, more efficient.
>>> C90 is "conservative and safe" compared to C99 in the same way that
>>> cars from the 1950's are "conservative and safe" compared to modern
>>> designs.
>>>
>>> (Of course you can write good C90 and bad C99 - it's the driver that
>>> makes the biggest difference to safety.)
>>
>> The text above sound as if function prototypes were invented for C99.
>> Of course, they are not.
>>
>> In practice there are only 3 features that make difference between C90
>> and C99 for majority of coders and all three are "nice to have" rather
>> than make a major difference.
>> 1. // comments
>> 2. declaration does not have to be at the beginning of {} block
>> 3. 'long long' integer types and <stdint.h>
>
> 4. Anonymous unions and structs within a struct definition:
>
>  struct {
>      int a;
>      union {
>         int b;
>          int c;
>          int d;
>          struct {
>              int e;
>              int f;
>          };
>      };
>      int g;
>  } x;
>
> Here, I can write x.a, x.c, x.e, instead of needing x.a, x.u.c,
> x.u.s.e etc when the nested union and struct are named u and s
> respectively.

Anonymous structs and unions were added in C11, not C99.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 13:59 +0000
  Re: function declaration without args no longer works Michael Bäuerle <michael.baeuerle@gmx.net> - 2026-04-26 16:24 +0200
    Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 16:29 +0000
      Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-04 19:36 +0000
        Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-05 00:15 -0700
          Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-05 09:10 +0000
            Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-05-05 11:17 +0200
              Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-05 11:07 +0000
            Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-05-05 02:24 -0700
              Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-05 11:20 +0000
              Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-05 18:09 +0000
                Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-07 12:52 +0000
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-07 14:51 +0000
              Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-06 11:41 +0200
            Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-05 10:03 -0700
              Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-05-07 12:35 +0000
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-05-08 07:36 -0700
                Re: function declaration without args no longer works antispam@fricas.org (Waldek Hebisch) - 2026-05-08 18:39 +0000
  Re: function declaration without args no longer works richard@cogsci.ed.ac.uk (Richard Tobin) - 2026-04-26 14:32 +0000
    Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 16:35 +0000
    Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-29 16:43 -0700
      Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-30 08:39 +0200
  Re: function declaration without args no longer works Michael S <already5chosen@yahoo.com> - 2026-04-26 17:50 +0300
    Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 16:39 +0000
      Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-27 00:30 +0000
        Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-27 08:30 +0200
          Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-28 07:02 +0000
            Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 10:16 +0200
              Re: function declaration without args no longer works antispam@fricas.org (Waldek Hebisch) - 2026-04-28 15:33 +0000
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 20:24 +0200
                Re: function declaration without args no longer works antispam@fricas.org (Waldek Hebisch) - 2026-04-28 20:22 +0000
              Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-29 06:22 +0000
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-29 09:15 +0200
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-29 10:06 +0200
                Re: function declaration without args no longer works Michael S <already5chosen@yahoo.com> - 2026-04-29 11:25 +0300
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-29 11:26 +0200
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-04-29 20:07 -0400
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 00:14 +0000
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-29 17:57 -0700
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-30 03:09 +0200
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-30 00:48 -0700
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-30 20:18 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-01 04:12 +0000
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-30 23:29 -0700
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-05-01 19:31 +0200
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-01 13:49 -0400
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-01 12:49 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-01 22:31 +0000
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-02 00:13 +0000
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-01 19:27 -0700
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-05-01 19:28 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-05-02 03:07 +0000
                Re: function declaration without args no longer works scott@slp53.sl.home (Scott Lurndal) - 2026-05-02 16:16 +0000
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 01:39 +0000
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-30 00:38 -0700
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-30 03:07 -0700
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-30 05:54 -0700
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-30 14:32 -0700
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-04-30 09:45 -0400
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-30 12:48 -0700
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-04-29 11:05 +0100
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-29 16:32 -0700
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-30 01:22 -0700
                Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-29 10:42 +0000
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-29 14:31 -0700
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-30 08:42 +0200
                Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-30 13:17 +0000
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-30 14:40 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 22:14 +0000
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-29 18:55 +0000
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-29 21:19 +0000
                Re: function declaration without args no longer works Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-29 16:46 -0700
            Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-28 14:25 +0200
              Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-28 13:13 +0000
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 15:48 +0200
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-04-28 15:05 +0100
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 16:37 +0200
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-28 14:02 -0700
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-29 09:29 +0200
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-29 02:49 -0700
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-04-29 20:06 -0400
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-29 17:13 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 00:45 +0000
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-04-29 21:11 -0400
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 01:40 +0000
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-29 20:09 -0700
                Re: function declaration without args no longer works scott@slp53.sl.home (Scott Lurndal) - 2026-04-30 14:57 +0000
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-30 15:07 +0000
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-04-30 16:20 +0100
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-30 16:10 +0000
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-04-30 17:48 +0100
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-30 22:31 +0200
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-30 22:18 +0000
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-05-01 00:25 +0100
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-01 00:08 +0000
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-05-01 01:24 +0100
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-30 17:46 -0700
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-01 01:55 +0000
                Re: function declaration without args no longer works Bart <bc@freeuk.com> - 2026-05-01 10:48 +0100
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-05-01 11:20 +0000
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-30 20:23 -0700
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-05-01 10:32 +0200
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-30 14:43 -0700
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-30 22:34 +0000
                Re: function declaration without args no longer works James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-05-01 13:32 -0400
                Re: function declaration without args no longer works scott@slp53.sl.home (Scott Lurndal) - 2026-05-01 18:12 +0000
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-30 03:50 +0200
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-30 08:52 +0200
                Re: function declaration without args no longer works "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-04-28 14:56 -0700
                Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-28 15:41 -0700
                Re: function declaration without args no longer works Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-29 21:20 +0000
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-28 17:14 +0200
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 17:31 +0200
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-28 19:06 +0000
                Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-28 21:44 +0200
                Re: function declaration without args no longer works Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-04-28 17:06 +0200
                Re: function declaration without args no longer works cross@spitfire.i.gajendra.net (Dan Cross) - 2026-04-28 19:23 +0000
  Re: function declaration without args no longer works David Brown <david.brown@hesbynett.no> - 2026-04-26 17:35 +0200
    Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 16:50 +0000
    Re: function declaration without args no longer works Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-26 15:52 -0700
  Re: function declaration without args no longer works Andrey Tarasevich <noone@noone.net> - 2026-04-26 08:38 -0700
    Re: function declaration without args no longer works John Forkosh <forkosh@panix.com> - 2026-04-26 16:56 +0000

csiph-web