On 2022/02/11 16:13, Joe Nelson wrote:
> 
> I noticed that OpenBSD lacks the POSIX "c99" compiler wrapper.
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
> 
> 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.

AFAIK we've never seen anything which uses it. At least not in ports.

> 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?

If it's added at all, base is probably the place for it.

> 0: https://github.com/freebsd/freebsd-src/blob/main/usr.bin/c99/c99.c

Funny, it strips -lrt!

> 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
> 

Reply via email to