This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: V3 PATCH: numeric_limits<> support, fix PR/3865


Richard Henderson <rth@redhat.com> writes:

| On Thu, Aug 29, 2002 at 11:28:58AM +0200, Gabriel Dos Reis wrote:
| > Since we already define _BIT__ for char and similar macros are needed
| > for floating point types, I'll propose, for consistency to provide it
| > for the rest of the integer types.
| 
| I don't see the value for other integer types.

Well, here is my line of reasoning:
  (1)  We need to define __CHAR_BIT__ for some reasons
  (2)  We need to define _BIT__ for floating point types, in order to
       derive bunch of limits and data formats
  (3) Somehow, we need to know the _BIT__ of integer types, for
      deriving numerical limits
  
Given, the above it makes sense and it seems consistent to define the
_BIT__ for all the fundamental types.  Doing so makes it straight to
derive all other values.

| If we're going to define anything for the fp types,
| it might as well be bits with which we could derive
| all the values in float.h, so that we can get rid 
| of the many header variants there as well.

In essence, that is what I'm aiming at.

-- Gaby
 


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