Re: Compiling kernel with -std=gnu11

Anders Magnusson <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
Den 2025-01-05 kl. 15:48, skrev Taylor R Campbell:
> Currently we compile the kernel with -std=gnu99.  Someone recently
> added some code that uses the u"foo" syntax for UTF-16 literals, which
> is new in C11.  With -std=gnu99, gcc accepts this syntax but clang
> rejects it -- clang requires -std=c11 or -std=gnu11.
>
> We could switch to L"foo" like is being used elsewhere, but it's not
> exactly correct -- the data in question really are fixed to be UTF-16,
> not some arbitrary interpretation of wide characters.  We may also
> want to use other C11 features such as _Atomic in the future.
>
> Any objections to compiling the kernel with -std=gnu11 instead?
What are the reasons why we cannot use -std=c11 instead in that case? -- 
Ragge
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.