This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal
On Sat, Sep 29, 2001 at 07:55:53PM +0200, Frank Klemm wrote:
> On Fri, Sep 28, 2001 at 12:36:13AM +0100, Neil Booth wrote:
> > Frank Klemm wrote:-
> >
> > > '_' should be allowed in numbers. It is allowed between the digits of
> > > numbers in a C/C++ source _before_ preprocessing. It is not allowed between
> > > digits which are 'created' during the preprocessor phase.
> >
> > Why are you so keen to disallow it in created tokens?
> >
> Write a filter which converts a C_99 source file to C99.
> The first with this restriction, the second without.
>
> It must be pssoible to translate such source file with "old" compilers.
If you're that interested in portability, simply do not use this
construct! That's the way the game is played. Your restriction buys
nothing except complexity.
> > If a patch to implement '_' in numbers were submitted, I would require
> > that a preprocessing number be a pp number no matter how it is created;
> > I'm pretty sure Zack would agree with me.
> >
> > > #define MY_MERGE_5(a,b,c,d,e) a##b##c##d##e
> > > #define MILLION MY_MERGE_5 ( 1, _, 000, _, 000 )
> > > #define BILLION MY_MERGE_5 ( MILLION, _, 000, _, 000 ) // UK notation
> >
> > BILLION won't expand to what you think. As for UK notation, I'm
> > British and I can't think of the last time I've seen a billion have 12
> > zeroes. In fact, I think the only time it occurs is when people are
> > comparing the claimed British and American forms :-)
> >
> A billion has no zeros: 1.e+12
I think that what Neil meant is:
% units billion
Definition: 1e9 = 1e+09
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer