Vadim Chekan writes:
 > Hi!
 > 
 > I've made patch for "include ${var}" but don't commit it. It's too late
 > and I'm too tired.
 > But I experenced very strange core dump.
 > in conf_lexer.lxx
 > extern HtConfiguration config;
 > ...
 > String ParsedFilename = \
 > ((HtConfiguration)config).ParseString(yytext);
 > ^^^^^^^^^^^^^^^^^^^^^^^^ stupid code, but I don't see nothing criminal
 > in it. It destroy data and core in next function.
 > 
 > config.ParseString(yytext); works fine.
 > 
 > Can anyone explain why 
 > SomeClass xxx
 > ((SomeClass)xxx).SomeMethod(); caused core?
 > 

 Ok, this cast should be a no-op, stricly speaking. Here is some test
code:

#include <iostream.h>

class foo {
public:
  foo() { cerr << "here\n"; }

  void f1();
};

void foo::f1() {
}

void bar(const foo& a)
{
}

int main()
{
  foo a;

  cerr << "1\n";
  bar(a);
  cerr << "2\n";
  bar((foo)a);
  cerr << "3\n";
  bar(foo(a));
  cerr << "4\n";
  a.f1();
  cerr << "5\n";
  ((foo)a).f1();
  cerr << "6\n";
}

Here is the result for me:

here
1
2
3
4
5
6

  I'd say that the problem is elsewhere or that another subtelty is 
involved and beyond my understanding.

         Cheers

-- 
                Loic Dachary

                24 av Secretan
                75019 Paris
                Tel: 33 1 42 45 09 16
                e-mail: [EMAIL PROTECTED]
                URL: http://www.senga.org/


------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] 
You will receive a message to confirm this. 

Reply via email to