Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Dec 2010 13:10:50 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-sparc64@freebsd.org
Cc:        Marius Strobl <marius@alchemy.franken.de>
Subject:   Re: [patch] rename macro parameter list in cpufunc.h
Message-ID:  <201012281310.50739.jhb@freebsd.org>
In-Reply-To: <20101228173529.GA38083@alchemy.franken.de>
References:  <20101228132703.GC68770@gahrfit.gahr.ch> <20101228173529.GA38083@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, December 28, 2010 12:35:29 pm Marius Strobl wrote:
> On Tue, Dec 28, 2010 at 02:27:04PM +0100, Pietro Cerutti wrote:
> > Dear all,
> > 
> > sys/sparc64/include/cpufunc.h defines macro having a parameter named
> > 'xor'. This is a reserved keyword in C++. For this reason, it is
> > impossible to use this header in C++ (e.g., by including
> > machine/atomic.h).
> > 
> > This patch [1] renames these parameters to _xor. Please review and/or
> > approve (I need an explicit approval in order to commit to src).
> > 
> > Thanks!
> > 
> > Best Regards,
> > 
> > [1] http://people.freebsd.org/~gahr/cpufunc.h.diff
> 
> Hrm, I really don't like the inconsistency only renaming "xor"
> introduces, rototilling the whole file also seems excessive though
> (also that would get it closer to style(9)). Would wrapping it in
> __BEGIN_DECLS or something like that work as an alternate solution?

Not for a reserved word like 'class'.  Maybe you could rename 'xor' to 
something else like 'mask' instead?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012281310.50739.jhb>