[TUHS] Minimum Array Sizes in 16 bit C (was Maximum)
Alexander Schreiber
als at thangorodrim.ch
Sun Nov 24 08:29:18 AEST 2024
On Mon, Nov 18, 2024 at 03:00:22PM -0000, Anton Shepelev wrote:
> Steve Nickolas <usotsuki at buric.co> wrote:
> >
> >I feel like most of the changes to C after C89 were a waste. Apart
> >from stdint.h, I mostly keep to coding in strict C89.
>
> And then I must not only specfy std-c89 in GCC, but add --pedantic, too.
> There is even a --pedantic club: <https://pedantic.software/> .
Snippet from a Makefile for a small university exercise of mine from
decades ago:
---- snip -----
# flags for debugging
DEBUG = -g -DDEBUG
# complain about everything suspicious
ANAL_RETENTIVE = -ansi -Wall -pedantic -Wtraditional -Wpointer-arith -Werror -Wshadow -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Waggregate-return -Wmissing-declarations -Wnested-externs -Winline
# use this for development
CC = gcc ${DEBUG} ${ANAL_RETENTIVE}
---- snip -----
Yes, I was keenly aware that I wasn't exactly "God's gift to C Programming"
and tried to get as much help from the compiler to avoid obvious mistakes
as possible.
Kind regards,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison
More information about the TUHS
mailing list