Thread overview
New dm.hpp for boosters, 4 bug reports, 1 question
Jan 09, 2004
dan
Re: New...4 bug reports... *** bug #3 update ***
Jan 09, 2004
dan
Jan 11, 2004
Walter
Jan 11, 2004
Matthew
Jan 11, 2004
Walter
January 09, 2004
For those using the boost diff file for DMC compatibility, the new dm.hpp file should be changed to the following:

--------------------------------------------
//  Digital Mars C++ compiler setup:
#define BOOST_COMPILER __DMC_VERSION_STRING__
#define BOOST_HAS_LONG_LONG
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define NEEDS_PASTING_TOKEN_FOR_JUXTAPOSING
#define BOOST_NO_OPERATORS_IN_NAMESPACE
#define BOOST_NO_SFINAE
#define BOOST_NO_TEMPLATE_TEMPLATES
#define BOOST_NO_USING_TEMPLATE
#define BOOST_USE_INT_3_INSTEAD_OF_ASSERT
#pragma once
// check for exception handling support:
#ifndef _CPPUNWIND
#  define BOOST_NO_EXCEPTIONS
#endif
#if (__DMC__ < 0x833)
#  if defined(BOOST_ASSERT_CONFIG)
#     error "Unknown compiler version - please run the configure tests and
report the results"
#  endif
#endif
--------------------------------------------------

.or just wait for boost 1.31; should be out in no time.

--------------------------------------------------

Bug report 1:

struct base< Derived >
{
struct inner {};
};
template< typename <T> >
struct derived : base< derived<T> >
{
inner x; //<- should flag error
void f()
{
inner y; //<-should flag error
}
};
.as inner is a dependent type requiring 'typename'.  Won't compile under
Comeau's latest Beta, but it compiles without warnings under DM.

--------------------------------------------------

Bug report 2:

struct base {};
struct derived : base {};
derived make_derived_temporary(){ return derived; }
void f()
{
base const & temp_ref = make_derived_temporary();
..statements...
} <- the temporary should last till here,
but in DM it is destroyed immediately upon assignment to the reference.

--------------------------------------------------

Bug report 3:

IDDE lockup, reasons unknown, but occurs while Parsing imports.

--------------------------------------------------

Bug report 4:

In IDDE, assert() terminates the app; I'm using the following, so that execution stops at the line of the assertion:

dmassert.hpp

#ifdef _DEBUG
#  ifdef assert
#    undef assert
#  endif
#  define assert(x) do{if(!((x)))asm int 3;}while(0)
#else
#  define assert(x) do{(void)(0);}while(0)
#endif

--------------------------------------------------

Question: Why doesn't DM automatically define _DEBUG in debug mode? I always have to tell it to define it. Missing something?

Cheers!


January 09, 2004
>--------------------------------------------------
>
>Bug report 3:
>
>IDDE lockup, reasons unknown, but occurs while Parsing imports.
>
>--------------------------------------------------

Update: It was caused by an

#include "..\"

Cheers!


January 11, 2004
Thanks, Dan, I'll check 'em out.

> Question: Why doesn't DM automatically define _DEBUG in debug mode? I
always
> have to tell it to define it. Missing something?

It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html


January 11, 2004
"Walter" <walter@digitalmars.com> wrote in message news:btqlgq$1dvd$1@digitaldaemon.com...
> Thanks, Dan, I'll check 'em out.
>
> > Question: Why doesn't DM automatically define _DEBUG in debug mode? I
> always
> > have to tell it to define it. Missing something?
>
> It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html

Is that DEBUG or _DEBUG?


January 11, 2004
"Matthew" <matthew.hat@stlsoft.dot.org> wrote in message news:btqpec$1kpd$1@digitaldaemon.com...
>
> "Walter" <walter@digitalmars.com> wrote in message news:btqlgq$1dvd$1@digitaldaemon.com...
> > Thanks, Dan, I'll check 'em out.
> >
> > > Question: Why doesn't DM automatically define _DEBUG in debug mode? I
> > always
> > > have to tell it to define it. Missing something?
> >
> > It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html
>
> Is that DEBUG or _DEBUG?

DEBUG