This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] Fix test03 in ostream_inserter_arith.cc
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jan 2002 02:28:20 +0100
- Subject: Re: [v3] Fix test03 in ostream_inserter_arith.cc
- References: <3C55B104.C98FA8F8@unitus.it> <20020128170028.A26266@redhat.com>
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.