Skip to content

C, distinguish between ordinary identifiers and tag names #7819

@jakobandersen

Description

@jakobandersen

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions