linux-stable/Documentation/translations/zh_CN/process
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
..
1.Intro.rst docs/zh_CN: Improve zh_CN/process/1.Intro.rst 2021-03-08 16:01:20 -07:00
2.Process.rst docs/zh_CN: add a missing space character 2021-07-15 06:33:44 -06:00
3.Early-stage.rst docs/zh_CN: Improve zh_CN/process/3.Early-stage.rst 2021-03-08 16:01:20 -07:00
4.Coding.rst docs/zh_CN: Improve zh_CN/process/4.Coding.rst 2021-03-08 16:01:20 -07:00
5.Posting.rst docs/zh_CN: typo fix and improve translation 2021-09-27 11:26:31 -06:00
6.Followthrough.rst docs/zh_CN: Improve zh_CN/process/6.Followthrough 2021-03-08 16:01:21 -07:00
7.AdvancedTopics.rst docs/zh_CN: Improve zh_CN/process/7.AdvancedTopics 2021-03-08 16:01:21 -07:00
8.Conclusion.rst docs: translations/zh_CN: fix a typo at 8.Conclusion.rst 2021-05-20 13:44:13 -06:00
code-of-conduct-interpretation.rst docs/zh_CN: redirect CoC docs to Chinese version 2019-04-19 15:56:06 -06:00
code-of-conduct.rst docs/zh_CN: redirect CoC docs to Chinese version 2019-04-19 15:56:06 -06:00
coding-style.rst docs/zh_CN: Remove the Microsoft rhetoric 2021-07-15 06:33:44 -06:00
development-process.rst docs/zh_CN: add disclaimer and translator info in development-process 2019-04-02 09:53:51 -06:00
email-clients.rst docs/zh_CN: add Alex into translator in email-clients 2019-04-02 09:53:56 -06:00
embargoed-hardware-issues.rst Documentation/process: Swap out the ambassador for Canonical 2020-02-13 15:38:41 -08:00
howto.rst docs/zh_CN: Improve zh_CN/process/howto.rst 2021-09-27 11:26:30 -06:00
index.rst docs/zh_CN: Improve zh_CN/process/index.rst 2021-03-08 16:01:20 -07:00
kernel-driver-statement.rst docs/zh_CN: translate kernel driver statement into Chinese 2019-12-30 12:00:42 -07:00
kernel-enforcement-statement.rst docs/zh_CN: translate kernel enforcement statement 2019-12-30 12:00:46 -07:00
license-rules.rst docs/zh_CN: include Chinese translation header for license-rules 2019-04-02 09:53:53 -06:00
magic-number.rst tty: remove TTY_LDISC_MAGIC 2021-03-10 09:34:06 +01:00
management-style.rst doc/zh_CN: fix a translation error in management-style 2021-11-15 02:53:30 -07:00
programming-language.rst Kbuild: move to -std=gnu11 2022-03-13 17:31:37 +09:00
stable-api-nonsense.rst docs/zh_CN: Cleanup stable-api-nonscense in Chinese 2019-04-02 09:53:56 -06:00
stable-kernel-rules.rst docs/zh_CN: redirect the submitting-patches to Chinese doc 2019-04-02 09:53:55 -06:00
submit-checklist.rst docs: Remove make headers_check from checklist in translations 2021-03-31 13:17:24 -06:00
submitting-drivers.rst Replace HTTP links with HTTPS ones: Documentation/translations/zh_CN 2020-06-19 13:40:02 -06:00
submitting-patches.rst Documentation: remove trivial tree 2022-01-10 10:24:29 +01:00
volatile-considered-harmful.rst Replace HTTP links with HTTPS ones: Documentation/translations/zh_CN 2020-06-19 13:40:02 -06:00