This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Proposal for the 'long long' problems


On Thu, Nov 01, 2001 at 12:09:12PM -0500, Phil Edwards wrote:
> On Thu, Nov 01, 2001 at 05:50:19PM +0100, Gabriel Dos Reis wrote:
> > | I say, also unguarded.  There's "only" macros and compiler support
> > | there too, no C library calls that I can see.
> > 
> > Agreed for the C library calls part.  
> > But those macros are considtionally defined.  
> 
> If you think they should be, okay.  Should they remain guarded by
> _USE_LONG_LONG or should we define them on _USE_C99 like the others
> instead?

IMHO, we should not have any _USE_C99 references in the library at all.

C99 is a very big, very strange, and in any case incompatible bag stuck
onto C, and I can't think of any circumstances where you would want it
all in a C++ program.  If we want particular C99ish features, we should 
refer to them specifically.  _USE_LONG_LONG is a good example of this.

Besides avoiding blanket "C99" references, we should avoid depending
on C99 library features unnecessarily.  In particular, strtoll is 
something we would better just slurp into our own code, and not need 
to check for or depend on.  (We can also supply our own strtoll that
uses the same code underneath.) The implementation would be better for
our needs anyhow, and would allow better range checking.

Nathan Myers
ncm at cantrip dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]