I was reading the manpage for gdb and I came across the line:

You can use GDB to debug programs written in C, C@t{++}, Fortran and Modula-2.

The C@t{++} looks like a regex but I can't seem to decode it.

What does it mean?

  • for which version? looks like C++ only they bodged the special encoding of ++ somehow
    – thrig
    Oct 18 '18 at 2:04
  • @thrig I can confirm this in Ubuntu 16.04, gdb 7.11.1-0ubuntu1~16.5.
    – Melebius
    Oct 18 '18 at 8:12
  • What makes this look like a regex to you?
    – Nic
    Oct 18 '18 at 18:40
  • FWIW, that would be an invalid regex. Oct 18 '18 at 18:41
  • Clearly they forgot how to write C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    – tchrist
    Oct 19 '18 at 0:23

GNU hates man pages, so they usually write documentation in another format and generate a man page from that, without really caring if the result is usable.

C@t{++} is some texinfo markup which didn't get translated. It wasn't intended to be part of the user-visible documentation. It should simply say C++ (possibly with some special font for the ++ to make it look nice).


The sequence @t{...} is the texinfo markup to typeset a sequence using fixed-width font (see the Fonts section of the texinfo manual for more details and some examples.)

It looks like they were trying to write "C++" and have the "++" use a fixed width font (like "++".) Perhaps someone found that yields better results with specific fonts while rendering documentation in PostScript or PDF or some format that uses variable-width fonts by default.

The reason why this doesn't seem to work and you're seeing the unprocessed sequence is that texinfo is used by the info documentation system, while man uses nroff which is a different language with different commands (for instance, the command to switch to a constant width font in nroff is \f(CW), so it of course didn't recognize the @t{...} sequence unchanged.

This issue seems to have been introduced in a commit from April 2013 where the man pages were converted to texinfo and that specific markup was introduced. It seems the script now used to generate the man pages (texi2man.pl) doesn't recognize or properly convert that sequence.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.