On Fri, Feb 11, 2022 at 04:13:22PM -0600, Joe Nelson wrote: > > I noticed that OpenBSD lacks the POSIX "c99" compiler wrapper. > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
"[CD] C-Language Development Utilities  The functionality described is optional." I don't see the point in adding a c89 c99 c11 c17 or c++98 c++03 c++11 c++14 c++17 c++20 c++23 wrapper. It is easy enough to specify -std and many people would be using the flags that add gnu extensions instead. > > Is it missing because the community feels it's ill conceived, or just > because nobody stepped up to implement it? If the latter, I can > contribute a patch to add it as a wrapper around cc. > > A few questions about the desired behavior: > > * If the user passes options not listed by POSIX, should the wrapper > die with a usage error, or pass them silently to the underlying > compiler? The FreeBSD implementation [0] does strict checking, while > NetBSD [1] and GCC on Debian [2] pass along all parameters. > > * Should it add -pedantic as well as -std=c99? > > * Is /usr/bin/c99 something that should go in OpenBSD base, or in > compiler ports? > > 0: https://github.com/freebsd/freebsd-src/blob/main/usr.bin/c99/c99.c > 1: https://github.com/NetBSD/src/blob/trunk/usr.bin/c99/c99.sh > 2: https://salsa.debian.org/toolchain-team/gcc-defaults/-/blob/master/c99 > >
