[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] small tweaks for ISO C++ compliance, Sun C++ bug
From: |
John W. Eaton |
Subject: |
[patch] small tweaks for ISO C++ compliance, Sun C++ bug |
Date: |
Wed, 18 Apr 2001 12:28:29 -0500 |
On 9-Apr-2001, Mumit Khan <address@hidden> wrote:
| Two simple tweaks
|
| - ISO C++ does not require an operator+ for streampos or fpos<charT> and
| an integral type [ See 27.4.3.2/1 for fpos<charT> requirements ]. The
| following testcase shows what the problem is:
|
| #include <ios>
|
| void
| foo()
| {
| std::streampos pos;
| long foo1;
| int foo2; // FOUR_BYTE_INT
|
| pos + foo1; // OK
| pos + foo2; // not OK, ambiguous
| pos + static_cast<std::streamoff> (foo2); // OK
| }
|
| This problem will show up using gcc versions >= -3.0.
|
| - DLD-FUNCTIONS/det.cc runs into a bug in Sun Workshop compilers --
| no default conversion for the arguments of ?: operator.
|
| Patch against current CVS tree.
I applied your patch.
Thanks,
jwe