News for hackers. Stuff that matters.
Re:Learn C in Y Minutes by 174SIGSEGV on Tuesday April 13, 2021 @06:03AM (#26790238)
The author recommends -std=c99 (-pedantic) default flags, yet suggests K&R (2nd edition, presumably) as a reference...
Re:Learn C in Y Minutes by flohofwoe on Tuesday April 13, 2021 @06:59AM (#26790586)
Also, why still use the old confusing long, short, long long etc... types when the much better fixed-width types had been standardized in stdint.h since C99 (even the Visual Studio C compiler has those since at least VS2015).
Re:Learn C in Y Minutes by pantalaimon on Tuesday April 13, 2021 @06:38AM (#26790432)
Little reason to not use at least -std=c11 these days
Re:Learn C in Y Minutes by bierjunge on Tuesday April 13, 2021 @06:41AM (#26790450)
Linux is C99, most microcontrollers use C99 or even C89. It would be nice to get the new features, but it's not always possible.
Re:Learn C in Y Minutes by pantalaimon on Tuesday April 13, 2021 @09:40AM (#26791973)
> most microcontrollers use C99 or even C89

Most microcontrollers are ARM Cortex-M and are programmed with a recent GCC toolchain

Re:Learn C in Y Minutes by flohofwoe on Tuesday April 13, 2021 @07:11AM (#26790660)
MSVC has C11 support only since very, very recently:

https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...

(it has a solid subset of C99 since around VS2015 though, just _Generic was missing - and ignoring VLAs, which have been "dropped" in later C standards anyway).

Re:Learn C in Y Minutes by junon on Tuesday April 13, 2021 @10:12AM (#26792375)
Verifiers haven't caught up to C11 yet.