Em Fri, 9 May 2025 23:34:25 +0300 Alexey Dobriyan <adobri...@gmail.com> escreveu:
> Signed-off-by: Alexey Dobriyan <adobri...@gmail.com> > --- > Documentation/process/coding-style.rst | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/Documentation/process/coding-style.rst > b/Documentation/process/coding-style.rst > index ac9c1dbe00b7..5c5902a0f897 100644 > --- a/Documentation/process/coding-style.rst > +++ b/Documentation/process/coding-style.rst > @@ -443,6 +443,20 @@ EVER use a typedef unless you can clearly match one of > those rules. > In general, a pointer, or a struct that has elements that can reasonably > be directly accessed should **never** be a typedef. > > +If you must use ``typedef`` consider using identical names for both the type > +and its alias so that the type can be forward declared if necessary: Better not, as symbols with duplicated names will generate a Sphinx warning (*). (*) It shouldn't, but there is a pending issue on Sphinx since version 3.1 still not addressed: https://github.com/sphinx-doc/sphinx/pull/8313 Regards, Thanks, Mauro