On Fri, Apr 22, 2011 at 12:39:28PM -0400, Ted Unangst wrote:
> On Fri, Apr 22, 2011 at 5:16 AM, Mike Williams <ob...@eandem.co.uk> wrote:
> > The style(9) man page contains the statement
> >
> >  Don't use the same name for a struct tag and a typedef, as this makes
> >  the code unusable from C++.
> >
> > My question is how does this make the code unusable from C++?
> 
> espie@ added this a long time ago, but I can't think of a specific
> example either.  This may be a reference to buggy compilers, as
> OpenBSD was using gcc 2.7 at the time.  If that's the case, it can
> probably be retired.

Yeah, it's probably the case. It's been a very long time.

In any case, I still think it's not a good idea to typedef structs, as
this tends to obfuscate the structure of the code and lead to stuff that's
hard to read and audit.

So, I'm perfectly okay with removing the reference to C++.

Reply via email to