Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Joy of this, Joy of that Date: 26 Nov 2024 04:43:47 GMT Lines: 39 Message-ID: References: <6iKdnTQOKNh6AqD6nZ2dnZfqn_idnZ2d@earthlink.com> <20241120081039.00006d2a@gmail.com> <_YOcnXSM0Is_2tj6nZ2dnZfqnPednZ2d@earthlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net MadNgP1OwfcJ1ygMRNqIyw6nUcmcyzs0lgJfPtH2Jwjoca92Uv Cancel-Lock: sha1:5qkK3rPrCcpRy0e/xz8qry41i3g= sha256:dyWBOdcGebfSJzRD7P2G2Smfg3OaP9nf+pue/bdLzLs= User-Agent: Pan/0.149 (Bellevue; 4c157ba) Xref: csiph.com comp.os.linux.misc:61362 On Mon, 25 Nov 2024 22:59:29 -0500, 186282@ud0s4.net wrote: > Heh ... much of my 'C' looks like the top example, all > straight-forward and readable. As I said somewhere, 'C' was the > neat-o new lang back when I got started in things so I strongly trend > towards the K&R look and feel even now. > SO easy to write incomprehensible 'C' ! Most of them have been 'fixed' but I'm sure there are K&R style definitions lurking someplace. #include "stdio.h" int add_stuff(a, b, c) int a; int b; int c; { return a + b +c; } int main(void) { printf("the sum is %d\n", add_stuff(1, 4, 6)); return 0; } still works with gcc 11.4 although with std=c2x it warns junk.c: In function ‘add_stuff’: junk.c:3:5: warning: old-style function definition [-Wold-style- definition] 3 | int add_stuff(a, b, c) | ^~~~~~~~~ I don't know if gcc will ever default to whining about them. That's staying power -- 46 years and cointing.