"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: Silence warnings being treated as errors on sparc64 and yacc rules reduced error
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
gameoftrees@openbsd.org, Omar Polo <op@omarpolo.com>
Date:
Thu, 9 Feb 2023 15:11:30 +0100

Download raw body.

Thread
> >i'm still puzzled why our current mix of -W doesn't catch this with
> >clang...
> 
> I wondered the same thing.

FWIW, clang 15 catches that. I believe older clang heed the implicit int
rule from K&R.

$ cc --version
OpenBSD clang version 15.0.7
Target: amd64-unknown-openbsd7.2
Thread model: posix
InstalledDir: /usr/bin
$ pwd
/home/tb/got/gotd
$ make
cc -O2 -pipe -O0 -g -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wunused-variable  -MD -MP -I/home/tb/got/gotd/../include -I/home/tb/got/gotd/../lib -I/home/tb/got/gotd -DGOT_LIBEXECDIR=/home/tb/bin -DGOT_VERSION=0.84-current -c gotd.c
gotd.c:108:6: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
usage()
     ^
           void
	   1 error generated.
	   *** Error 1 in /home/tb/got/gotd (<sys.mk>:87 'gotd.o')