tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Compiling kernel with -std=gnu11



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

Home | Main Index | Thread Index | Old Index