Why does a C comment like /* */ need '<'?

Solution 1:

It's a way for doxygen to generate documentation for members of a file/struct/union/class/enum. By using that marker, you can put comments after each member, leading to less clutter. You can read more about it here.

Solution 2:

As others have replied, this is probably a comment that is meant for doxygen. When parsing comments, doxygen have some special rules:

  • An ordinary comment starting with /* is ignored by doxygen.
  • A comment starting with /** is treated as documentation of the next item after the comment in the source code.
  • A comment starting with /**< is treated as documentation of the item immediately before the comment in the source code.

Documentation is mostly placed above the documented item, e.g. a function. But in some cases such as a #define it makes sense to put the documentation at the end of the line instead and in that case the /**< marker is needed.

Solution 3:

It is a doxygen syntax for commenting members after declaration/definition.

Solution 4:

I assume your team uses some automated documentation tool which looks for /**<; e.g. Doxygen.