On Tuesday 19 May 2009, Øyvind Harboe wrote:
> > I'd rather do away with all typedefs myself, except maybe
> > for "int" variants.  Ditto that "*_t" convention.
> >
> > Anyone feel strongly pro-typedef?
> 
> I think that typedefs are useful when a level of indirection is
> needed, it is non-trivial to define the type(u32, u8, intptr_t, etc.)
> or the type itself is horrible to spell out(pointer to a function
> which takes a pointer to....)

That "non-trivial" encapsulates the portability issues;
those all boil down to "needed".  Except, in some cases,
the function typedef ... I'd rather see those spelled out
in most signatures, but there are cases where that's just
on the wrong side of too painful.


> When the type is striaghtforward(int or struct), then typedef can
> make things less readable. "typedef struct x x_t" is such an example.

Right.

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to