-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Milestone
Description
Describe the bug
It should be possible to have a type with the same name as a struct/union/enum, as in the language.
To Reproduce
Steps to reproduce the behavior: as example, consider the following documentation (where every instance of struct
could be replaced with union
or enum
instead):
.. c:struct:: foo
.. c:type:: struct foo foo
No duplicate declaration warning.
- :c:struct::`foo`, link to the struct.
- :c:type::``foo``, link to the typedef.
- :c:any:``foo``, probably link to the type?
- Perhaps new feature: :c:any:``struct foo``, link to the struct.
- :c:expr:``foo*``, hyperlink ``foo`` to the typedef.
- c:expr:``struct foo*``, hyperlink ``foo`` (or all of ``struct foo``?) to the struct.
Expected behavior
See above.
Additional context
- See also Duplicate definition with C "typedef struct foo foo" breathe-doc/breathe#543.
- An implementation of this could perhaps be split into something backwards compatible, and then the breaking part for the next major version.