PATCH: Support C++ in demanle.h

H. J. Lu hjl@lucon.org
Sun Jul 6 21:48:00 GMT 2003


On Sun, Jul 06, 2003 at 05:26:44PM -0400, DJ Delorie wrote:
> 
> > I have no problems with either way. I just want to be
> > consistent. Every file under include/ has the same style. I don't
> > see why demangle.h should be any different.
> 
> Less than half the headers have the C++ guards at all, and some that
> do have the includes (or at least some of the includes) outside the
> guards.  Feel free to propose a patch to clean them up.

I will try when I find time and noone beats me.

> 
> FYI the reason we shouldn't guard includes - in general - is because
> the included files might need to prototype C++ functions.  It doesn't
> happen to be the case in libiberty, but it's a bad habit to get into.
> 
> Meanwhile, if you move the guard past the includes in demangle.h, you
> can commit that patch.
> 
> > BTW, I'd like to fix 3.3 too.
> 
> Likewise for demangle.h.  I see no pressing need to clean up the
> others here.

I checked the demangler fix into src, gcc and gcc 3.3.


H.J.



More information about the Binutils mailing list