Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-08-18 07:16:21


On Wed, Aug 18, 2004 at 12:37:44PM +0100, John Maddock wrote:

>
> > Since I do not want to use -pedantic but not specify -Wno-longlong--I
> > really do want the 'pedantic' warnings with unadorned extensions like
> > long long warned--it is likely that I (and perhaps many other people who
> > use GCC) will retain something like this patch locally if it is deemed
> > inappropriate for Boost. This would be unfortunate.

I certainly think it makes sense to do something to allow compiling with
-pedantic. Since -std=c++98 has little effect on g++ (at least until
C++0x exists and is supported) it's possible (I won't claim likely) that
-pedantic is more commonly used, as it has a real and noticeable effect.

> How about something like:
>
> BOOST_EXTENSION(x)
>
> which expands to "__extension__ x" on gcc and "x" otherwise?
>
> Then we can use BOOST_EXTENSION(long long) where necessary.
>
> Thoughts?

I like that. It's obvious that you're talking about the commonly
available "long long" type, and also obvious it's an extension.
Aaron's long_long type _could_ mean something other than "long long"

The __extension__ keyword can be used before any expression that
-pedantic rejects, including literals such as 0LL or 0ULL, so that
macro would make that BOOST_EXTENSION( 0LL ).

jon

-- 
"It is useless to attempt to reason a man out of a thing
 he was never reasoned into."
	- Jonathan Swift

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk