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] Fix test03 in ostream_inserter_arith.cc


Richard Henderson wrote:

> On Mon, Jan 28, 2002 at 09:13:56PM +0100, Paolo Carlini wrote:
> > +  if (sizeof(short) == 2)
>
> You need to take the width of char into account too, like so:
>
>         (sizeof(short) * CHAR_BITS == 16)

I get your point.
However, being this part of the libstdc++ testsuite, I could work in terms of
numeric_limits, that is:

            (numeric_limits<short>::digits + 1 == 16)

and so on... Do you agree?

> > +  else // sizeof(long) == 8
>
> I suggest that you not imply a default for these elses.

Ok, I will not.

Cheers,
Paolo.



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