linux/Documentation/translations/zh_CN
Arnd Bergmann e8c07082a8 Kbuild: move to -std=gnu11
During a patch discussion, Linus brought up the option of changing
the C standard version from gnu89 to gnu99, which allows using variable
declaration inside of a for() loop. While the C99, C11 and later standards
introduce many other features, most of these are already available in
gnu89 as GNU extensions as well.

An earlier attempt to do this when gcc-5 started defaulting to
-std=gnu11 failed because at the time that caused warnings about
designated initializers with older compilers. Now that gcc-5.1 is
the minimum compiler version used for building kernels, that is no
longer a concern. Similarly, the behavior of 'inline' functions changes
between gnu89 using gnu_inline behavior and gnu11 using standard c99+
behavior, but this was taken care of by defining 'inline' to include
__attribute__((gnu_inline)) in order to allow building with clang a
while ago.

Nathan Chancellor reported a new -Wdeclaration-after-statement
warning that appears in a system header on arm, this still needs a
workaround.

The differences between gnu99, gnu11, gnu1x and gnu17 are fairly
minimal and mainly impact warnings at the -Wpedantic level that the
kernel never enables. Between these, gnu11 is the newest version
that is supported by all supported compiler versions, though it is
only the default on gcc-5, while all other supported versions of
gcc or clang default to gnu1x/gnu17.

Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/
Link: https://github.com/ClangBuiltLinux/linux/issues/1603
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Marco Elver <elver@google.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: David Sterba <dsterba@suse.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Alex Shi <alexs@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-03-13 17:31:37 +09:00
..
accounting docs/zh_CN: Add zh_CN/accounting/delay-accounting.rst 2021-12-23 12:44:17 -07:00
admin-guide docs/zh_CN: Update and fix a couple of typos 2022-01-03 15:52:16 -07:00
arm docs: Update DTB format references 2021-01-28 15:43:15 -07:00
arm64 Documentation: Chinese translation of Documentation/arm64/elf_hwcaps.rst 2020-11-30 10:36:45 -07:00
core-api driver core changes for 5.17-rc1 2022-01-12 11:11:34 -08:00
cpu-freq doc/zh-CN: Update cpu-freq/core.rst to make it more readable 2021-12-10 14:28:31 -07:00
dev-tools docs/zh_CN: update sparse translation 2021-11-29 15:01:27 -07:00
doc-guide docs: Update Sphinx requirements 2021-11-15 02:47:22 -07:00
filesystems docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
iio docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
infiniband docs/zh_CN: add infiniband user_verbs translation 2021-08-12 08:52:03 -06:00
kernel-hacking Documentation: in_irq() cleanup 2021-08-24 13:28:23 -06:00
maintainer docs: use the lore redirector everywhere 2021-10-12 13:58:19 -06:00
mips docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
openrisc docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
parisc docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
PCI docs/zh_CN: add sysfs-pci trnaslation 2021-12-16 15:55:43 -07:00
process Kbuild: move to -std=gnu11 2022-03-13 17:31:37 +09:00
riscv docs/zh_CN: Modify the translator tag and fix the wrong word 2021-08-24 13:34:07 -06:00
scheduler docs/zh_CN: Add sched-domains translation 2021-12-23 12:41:54 -07:00
sound PATCH Documentation translations:translate sound/hd-audio/controls to chinese 2021-03-08 16:54:05 -07:00
video4linux media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
virt docs/zh_CN: add virt acrn cpuid translation 2021-08-12 08:49:38 -06:00
disclaimer-zh_CN.rst Docs/zh_CN: update Alex Shi new email address 2021-03-31 13:52:25 -06:00
gpio.txt docs: gpio: add sysfs interface to the admin-guide 2019-07-15 11:03:03 -03:00
index.rst doc/zh_CN: add Chinese document coding style reminder 2021-12-10 14:00:25 -07:00
io_ordering.txt docs: fix pointers to io-mapping.rst and io_ordering.rst files 2020-03-11 14:15:20 -06:00
IRQ.txt docs: add IRQ documentation at the core-api book 2020-05-15 12:00:56 -06:00
oops-tracing.txt docs: admin-guide: add kdump documentation into it 2019-07-15 11:03:01 -03:00