Following that comment precisely means we should remove them if there are no functions. That ignores data items and the simple maintenance issue of not having an extern C, adding something in the future and forgetting to add extern C.
IMO it's just part of the header file template we should always use. Deciding when it is absolutely not needed is going to introduce latent issues. On Mon, Jan 23, 2023, 3:57 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > 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 > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel