Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #384292

Re: Recursion, Yo

Path csiph.com!news.swapon.de!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Recursion, Yo
Date Thu, 11 Apr 2024 12:37:11 -0700
Organization None to speak of
Lines 41
Message-ID <87cyqvg07s.fsf@nosuchdomain.example.com> (permalink)
References <uut24f$2icpb$1@dont-email.me> <uutqd2$bhl0$1@i2pn2.org> <uv2u2a$41j5$1@dont-email.me> <87edbestmg.fsf@bsb.me.uk> <uv4r9e$mdd3$1@dont-email.me> <uv5e3l$q885$1@dont-email.me> <uv5gfd$qum1$1@dont-email.me> <uv5lgl$s6uj$1@dont-email.me> <uv61f6$v1jm$1@dont-email.me> <uv68ok$11080$1@dont-email.me> <uv7a8n$18qf8$3@dont-email.me> <uv867l$1j8l6$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Date Thu, 11 Apr 2024 21:37:18 +0200 (CEST)
Injection-Info dont-email.me; posting-host="0e70ff92e98e71e1faa57b3205b22b5a"; logging-data="1962409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+li+nNWoclqgSHDL6hPdRw"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock sha1:rKSo93/duYKrOchFEWzPG7RMni0= sha1:JYw7/D7tQSEDAc1RAngDGNCJfGA=
Xref csiph.com comp.lang.c:384292

Show key headers only | View raw


David Brown <david.brown@hesbynett.no> writes:
> On 11/04/2024 02:18, Lawrence D'Oliveiro wrote:
>> On Wed, 10 Apr 2024 16:46:43 +0200, David Brown wrote:
>> 
>>> Just for your entertainment, with C++ lambdas this is now legal code:
>>>
>>> void foo(void) {
>>> 	[](){}();
>>> }
>> C programmer still has habit of writing “(void)” when C++ allows
>> “()”
>> instead.
>
> I do that sometimes, yes.  I could argue that I think it is better to
> be explicit than implicit, but it's just my fingers on automatic.  The 
> kinds of programs I work on can rarely be pure C++ - there's always
> lots of C code too, and it's often useful to write code in a way that
> is suitable for both C and C++.
>
> In this particular case, of course, there's not much advantage to
> having a C-style function declaration!
>
>> Does the latest C spec now also take “()” to mean “no args”
>> (synonymous
>> with “(void)”) instead of “unspecified args”?
>
> It does, yes, in C23.  If you want to declare a function with no
> information about the number or type of parameters, you can now write 
> "void foo(...);".  (Prior to C23 you needed at least one normal typed
> parameter before the ellipsis.)

That's not quite the same.  (...) declares a variadic function, whose
arguments (if any) can be accessed using the macros in <stdarg.h>.
Functions with an old-style () declaration can access their arguments by
names given in the definition Variadic functions could have a different
calling convention.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

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


Thread

Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-07 02:58 +0000
  Re: Recursion, Yo fir <fir@grunge.pl> - 2024-04-07 11:52 +0200
    Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-09 10:25 +0200
      Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-09 08:43 +0000
        Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-09 14:27 +0200
          Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-09 15:27 +0100
            Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-09 21:55 +0200
              Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-09 13:31 -0700
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-10 08:30 +0200
        Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-09 15:02 +0100
      Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-09 11:44 +0100
        Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-09 13:25 +0100
        Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-10 01:50 +0000
          Re: Recursion, Yo "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-09 20:54 -0700
          Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-10 09:11 +0200
            Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-10 07:52 +0000
              Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-10 11:18 +0200
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-10 13:42 +0100
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-10 16:46 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-11 00:18 +0000
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-11 00:54 +0000
                Heh heh...  (Was: Recursion, Yo) gazelle@shell.xmission.com (Kenny McCormack) - 2024-04-11 08:00 +0000
                Re: Heh heh...  (Was: Recursion, Yo) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-11 15:13 +0000
                Re: Heh heh...  (Was: Recursion, Yo) gazelle@shell.xmission.com (Kenny McCormack) - 2024-04-11 19:06 +0000
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-11 15:04 +0000
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-11 20:47 +0200
                Re: Recursion, Yo scott@slp53.sl.home (Scott Lurndal) - 2024-04-11 15:15 +0000
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-12 02:31 +0000
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-12 03:51 +0000
                Re: Recursion, Yo cross@spitfire.i.gajendra.net (Dan Cross) - 2024-04-12 12:51 +0000
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-12 07:32 +0200
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-12 09:30 +0200
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-12 15:03 +0200
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-12 16:51 +0200
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-13 19:17 +0200
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-13 20:04 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-13 00:10 +0000
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-12 07:34 +0000
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-12 14:35 +0200
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-12 16:42 +0100
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-13 00:13 +0000
                Re: Recursion, Yo Michael S <already5chosen@yahoo.com> - 2024-04-13 20:33 +0300
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-14 00:23 +0100
                Re: Recursion, Yo Michael S <already5chosen@yahoo.com> - 2024-04-14 03:29 +0300
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-15 15:07 +0200
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-15 08:46 -0700
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-15 17:47 +0100
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-15 12:00 -0700
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-15 20:24 +0100
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-15 21:37 +0100
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-15 22:39 +0200
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-15 22:54 +0200
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-15 14:25 -0700
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-14 00:29 +0000
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-13 20:05 -0700
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-13 19:37 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-14 00:28 +0000
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-14 11:17 +0100
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-14 13:51 +0100
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-14 22:47 +0100
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-14 22:44 +0000
                Re: Recursion, Yo "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-04-14 20:35 -0700
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-15 17:50 +0100
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-15 22:30 +0000
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-17 18:09 +0100
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-17 22:12 +0000
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-22 18:06 +0200
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-15 20:36 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-15 22:32 +0000
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-22 17:41 +0200
                Re: Recursion, Yo Michael S <already5chosen@yahoo.com> - 2024-04-16 23:11 +0300
                Re: Recursion, Yo Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-19 08:26 -0700
                Re: Recursion, Yo scott@slp53.sl.home (Scott Lurndal) - 2024-04-19 18:25 +0000
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-19 12:15 -0700
                Re: Recursion, Yo Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-20 05:55 -0700
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-19 19:34 +0100
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-20 02:11 +0100
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-19 18:24 -0700
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-20 15:35 +0000
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-19 12:18 -0700
                Re: Recursion, Yo Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-20 06:03 -0700
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-22 17:49 +0200
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-15 17:50 +0100
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-12 10:38 +0100
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-12 15:07 +0200
                Re: Recursion, Yo bart <bc@freeuk.com> - 2024-04-12 16:38 +0100
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-12 19:06 -0700
                Re: Recursion, Yo Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-13 07:46 -0700
                Re: Recursion, Yo scott@slp53.sl.home (Scott Lurndal) - 2024-04-11 14:36 +0000
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-11 10:15 +0200
                Re: Recursion, Yo Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-04-11 12:37 -0700
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-12 09:38 +0200
                Re: Recursion, Yo fir <fir@grunge.pl> - 2024-04-14 20:34 +0200
                Re: Recursion, Yo Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-04-10 15:18 +0200
                Re: Recursion, Yo scott@slp53.sl.home (Scott Lurndal) - 2024-04-10 14:23 +0000
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-11 00:16 +0000
                Re: Recursion, Yo scott@slp53.sl.home (Scott Lurndal) - 2024-04-11 14:34 +0000
                Re: Recursion, Yo Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-04-12 00:04 +0100
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-10 17:19 +0000
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-10 21:19 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-11 00:54 +0000
                Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-11 02:06 +0000
                Re: Recursion, Yo David Brown <david.brown@hesbynett.no> - 2024-04-11 10:23 +0200
                Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-11 08:34 +0000
            Re: Recursion, Yo Kaz Kylheku <643-408-1753@kylheku.com> - 2024-04-10 17:10 +0000
          Re: Recursion, Yo Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-10 10:14 -0700
  Re: Recursion, Yo Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-04-09 08:44 +0000

csiph-web