From 80dc2c85a53ead189a2a8a15e9d20895b2c34478 Mon Sep 17 00:00:00 2001 From: Shiqing Gao Date: Tue, 19 Mar 2019 13:07:58 +0800 Subject: [PATCH] doc: add some rules related to language extensions This patch adds some rules related to language extensions. Tracked-On: #861 Signed-off-by: Shiqing Gao --- doc/developer-guides/coding_guidelines.rst | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/doc/developer-guides/coding_guidelines.rst b/doc/developer-guides/coding_guidelines.rst index 09c7a3d36..8f29d494a 100644 --- a/doc/developer-guides/coding_guidelines.rst +++ b/doc/developer-guides/coding_guidelines.rst @@ -3310,3 +3310,47 @@ The number of bytes in an object is implementation-defined, according to J.3.13 item 2 in C99. For ACRN hypervisor, char is 1 byte, short is 2 bytes, int is 4 bytes, long is 8 bytes, and long long is not used. +Language Extensions +******************* + + +LE-01: Use of inline Assembly language in C Code is allowed +=========================================================== + +This feature refers to section 6.45 in GCC 7.3 Manual. + +LE-02: Use of type attribute 'aligned' is allowed +================================================= + +This feature refers to section 6.33.1 in GCC 7.3 Manual. + +LE-03: Use of type attribute 'packed' is allowed +================================================ + +This feature refers to section 6.33.1 in GCC 7.3 Manual. + +LE-04: Use of builtin-type '__builtin_va_list' is allowed +========================================================= + +This feature refers to section 6.20 in GCC 7.3 Manual. + +LE-05: Use of builtin-function '__builtin_va_arg' is allowed +============================================================ + +This feature refers to section 6.20 in GCC 7.3 Manual. + +LE-06: Use of builtin-function '__builtin_va_start' is allowed +============================================================== + +This feature refers to section 6.20 in GCC 7.3 Manual. + +LE-07: Use of builtin-function '__builtin_va_end' is allowed +============================================================ + +This feature refers to section 6.20 in GCC 7.3 Manual. + +LE-08: Use of builtin-function '__builtin_offsetof' is allowed +============================================================== + +This feature refers to section 6.51 in GCC 7.3 Manual. +