[PATCH] eng: Clarify use of extern "C"

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jan 23 09:57:43 UTC 2023


Close #4806.
---
 eng/coding-file-hdr.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eng/coding-file-hdr.rst b/eng/coding-file-hdr.rst
index 3167670..e6f5b30 100644
--- a/eng/coding-file-hdr.rst
+++ b/eng/coding-file-hdr.rst
@@ -98,6 +98,9 @@ Use the following guidelines and template for C and C++ header files (here
 
 * For C++ header files discard the ``extern "C"`` start and end sections.
 
+* The ``extern "C"`` is only required if the C header file contains function
+  declarations or inline function definitions.
+
 .. code-block:: c
 
     /* SPDX-License-Identifier: BSD-2-Clause */
-- 
2.35.3



More information about the devel mailing list