Jump to page: 1 2
Thread overview
[bug 8.49.2]
Jul 06, 2006
Pavel Vozenilek
Re: [bug 8.49.2] new (std::nothrow)
Jul 06, 2006
Pavel Vozenilek
Re: [bug 8.49.2] yet one more
Jul 06, 2006
Pavel Vozenilek
Re: [bug 8.49.2] switching ADL off failure?
Jul 07, 2006
Pavel Vozenilek
Jul 07, 2006
Walter Bright
Jul 07, 2006
Pavel Vozenilek
Re: [bug 8.49.2] friend problem
Jul 07, 2006
Pavel Vozenilek
Jul 07, 2006
Pavel Vozenilek
Re: [bug 8.49.2] handy warning missing
Jul 07, 2006
Pavel Vozenilek
Re: [bug 8.49.2] problem with arrays
Jul 07, 2006
Pavel Vozenilek
Re: [bug 8.49.2] template argument as friend already in
Jul 07, 2006
Pavel Vozenilek
Re: [bug 8.49.2] a test crashing compiler
Jul 07, 2006
Pavel Vozenilek
Jul 10, 2006
Pavel Vozenilek
Jul 11, 2006
user
Re: [bug 8.49.2] overloaded operator new/delete
Jul 12, 2006
Pavel Vozenilek
July 06, 2006
This code snippet works under Intel 7.0 and Comeau
Online, fails to compile under the latest beta.
It is trimmed down dynamic_bitset example from Boost.


-----------------------------------------------------------------
namespace boost {
    namespace detail {

    template <typename T>
    struct dynamic_bitset_allowed_block_type {
        enum { value = T(-1) > 0 }; // ensure T has no sign <<<=== here it
fails
    };

    } // namespace detail

// static assert support
template <bool x> struct STATIC_ASSERTION_FAILURE;
template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
template<int x> struct static_assert_test{};



template<typename Block = unsigned long>
class dynamic_bitset
{
    typedef ::boost::static_assert_test
    <
        sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool) (
            detail::dynamic_bitset_allowed_block_type<Block>::value ) >)
    >
    boost_static_assert_typedef_999;

public:
    dynamic_bitset(unsigned num_bits, unsigned long value = 0) {}
};

} // namespace boost

int main()
{
    boost::dynamic_bitset<> x(5);
    return 0;
}
--------------------------------------------------------------




It fails with some "invalid syntax" message:
       x.cpp(11) : Error: '}' expected



Trying to find the minimal test I was able to provoke invalid generation of code (resulting in system dialog whether I wish to send error report to Redmond :).


I do not know what value could such finding has,
it is not minimal and requires using Boost headers.


/Pavel


July 06, 2006
This tiny snippet works on Intel and Comeau online
(and should just everywhere):

---------------------------------
#include <new>

int main()
{
  char* ch = new (std::nothrow) char[1];
  return 0;
}
-------------------------------------

It comes from Boost.Pool.
The error emitted is:
   x.cpp(8) : Error: no match for function '?_P(unsigned ,const
std::nothrow_t)'


/Pavel


July 06, 2006
Following snippet compiles in Intel and online Comeau.
DMC fails with error:
   x.cpp(26) : Error: 'tuple' is already defined

---------------------------------------
struct nil_t {};

template <typename A = nil_t>
struct tuple;

template <typename DerivedT>
struct tuple_base {};

template <>
struct tuple<> : public tuple_base<tuple<> > {};

int main() { return 0; }
--------------------------------------------

This was extracted from Boost.Spirit (the parser library).

/Pavel


July 07, 2006
This code snippet compiles in Comeau and Intel.

-----------------------------------------
template<class T>
class bbb
{
public:
    explicit bbb(T val)
        : n((val.max)()-(val.min)()) //<<<== here it fails, notice the
parenthesis
    {
    }


private:
    T::result_type n;
};


struct ccc
{
    typedef int result_type;
    int min() { return 0; }
    int max() { return 0; }
};


int main()
{
    ccc c;
    bbb<ccc> b(c);
    return 0;
}
--------------------------------------------------

In DMC it returns:
  x.cpp(6) : Error: type mismatch
  Had: bbb<ccc >
  and: ccc
  x.cpp(7) : Error: need explicit cast to convert
  from: bbb<ccc >
  to  : int

The problematic part are the parenthesis around
"max.val" call as in (max.val)().

If the parenthesis are removed it compiles. I guess they are there in order to switch off any ADL lookup.

The code is trimmed down snippet from failing Boost.Random.

/Pavel










July 07, 2006
Thanks for the new reports.

Is the 8.49.2 beta at least getting further than 8.49.1?
July 07, 2006
"Walter Bright" wrote:

> Is the 8.49.2 beta at least getting further than 8.49.1?
>

Yes, some Boost tests do work now.


The Boost official bug report still uses the
very old compiler - I was told they had switched
but nothing's visible so far.

I also tried to compile the STLport 5.10
said to support DMC: they have bugs in makefile.

/Pavel


July 07, 2006
This code compiles on Intel and Comeau.
It is trimmed down problem with Boost.Operators
and Boost.Serialization.

-------------------------------------------
template <class T, class U>
struct aaa
{
    friend bool operator==(const U& y, const T& x) { return x == y; }
};

struct bbb {};

struct ccc {};

int main()
{
    aaa<bbb, ccc> a;
    return 0;
}
--------------------------------------------

/Pavel



July 07, 2006
A bug courtesy of Boost.CRC. Intel + Comeau work here.

---------------------------------------------
template< int T>
struct uint_t;

template
<
    unsigned Bits,
    typename uint_t<Bits>::fast U
>
struct aaa  {};


template <unsigned Bits>
void foo(aaa<Bits, 1> *p);

int main()
{
    return 0;
}
--------------------------------------------

/Pavel


July 07, 2006
With code:

------------------------
int main()
{
  return 0;
  return 0;
}
-----------------------

no warning is given
although there's clear mistake.

Comeau and BCB do emit error ("unreachable"), Intel doesn't.

/Pavel




July 07, 2006
Works on Intel, Comeau:

-----------------------------------
template< typename T, unsigned sz >
inline T* range_begin( T (&array)[sz] )
{
    return array;
}

template< class T >
inline void begin( T& r )
{
    range_begin( r );
}

int main()
{
    const int sz = 9;
    int           my_array[sz]  = { 1,2,3,4,5,6,7,8,9 };

    begin( my_array );
    return 0;
}
----------------------------------------

I am not really sure what is the problem, possibly
something with different rules for array decay on
templates and non-templates.

This is trimmed down problem from Boost.Range.



Btw, compilation of Boost.Range
(and Boost.String Algorithms that use Range)
is veeery slow with DMC.

The Intel 7.0 does compile some tests visibly faster.

/Pavel




« First   ‹ Prev
1 2