This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal
- To: pfk at RZ dot uni-jena dot de
- Subject: Re: Proposal
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Mon, 17 Sep 2001 23:59:28 +0100
- Cc: gcc at gcc dot gnu dot org
- References: <200109151841.UAA04064@fuchs.offl.uni-jena.de>
Frank Klemm wrote:-
> Ada 83 and Ada 95 allows '_' in numbers to separate groups of numbers:
>
> 0xFFFF_FFFF_FFFF_FFFC
> 1_000_000_000_000
> 0x0FFF_FFFF_FFFF_FFFC
> 10_000_000_000_000
> 3.14159_26535_8979
> 12_768_487.0
>
> The '_' is allowed at every position between digits, but it is recommend to use
> it in the way above.
This is possibly a good idea. It's a trivial patch to implement it
(c-lex.c I think, unless Zack finally applies his number patch); a
comment even exists in the code mentioning that it might be a future
extension.
> It is not allowed to compose numbers with '_' inside of macros.
>
> #define MILLION _MERGE5 ( 1, _, 000, _, 000 )
>
> This allows easily to write a filter to generate C89 or C99 files.
I don't understand quite what you're saying here. If you're saying
dissallow concatenation with ## then I would strenuously object, since
1) disallowing it seems gratuitous,
2) it's specifically allowed by the standard, and
3) it would be introducing yet more special cases to the preprocessor,
which already has too many of those for my liking.
Neil.