Cygwin 3.6: clang cannot use /usr/include/unistd.h, issue with |setproctitle_init()| ...

Christian Franke Christian.Franke@t-online.de
Wed Mar 5 16:16:25 GMT 2025


Roland Mainz via Cygwin wrote:
> Small issue with Cygwin 3.6 (3.6.0-0.419.g3c1308ed890e.x86_64) system
> /usr/include/unistd.h and clang:
> ---- snip ----
> $ clang --version
> clang version 8.0.1 (tags/RELEASE_801/final)
> Target: x86_64-unknown-windows-cygnus
> Thread model: posix
> InstalledDir: /usr/bin
> $ clang -std=gnu17 -Wall -Wextra -g foo.c -lntdll -o foo.i686.exe
> In file included from foo.c:37:
> In file included from /usr/include/unistd.h:4:
> /usr/include/sys/unistd.h:218:42: error: parameter name omitted
> static inline void setproctitle_init (int, char *[], char *[]) {}

The error is valid because the addition of this very old C++ feature 
took a very long time :-)
clang 15 says:
warning: omitting the parameter name in a function definition is a C2x 
extension [-Wc2x-extensions]
gcc 12 requires '-pedantic' option:
warning: ISO C does not support omitting parameter names in function 
definitions before C2X [-Wpedantic]
-- 
Regards,
Christian


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /