Documentation for target macros: comments vs. tm.texi

Joseph S. Myers jsm28@cam.ac.uk
Mon Jan 7 15:10:00 GMT 2002


On Mon, 7 Jan 2002, Richard Henderson wrote:

> Ideally there'd be a single sentence in the trivial case mentioning
> what, if anything, is unusual about this definition for this port.

If there's something interesting to say that isn't just repeating what the 
definition of the macro means, yes.  However, if there are any comments of 
the form

/* On a FooBar machine, ints are 32 bits.  */
#define INT_TYPE_SIZE 32

then we don't need them; a single comment /* Type sizes.  */ or similar
above all such definitions should suffice unless there's something to
comment on that isn't repeating the code, e.g. why a particular value was
chosen.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list