This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to disable incorrect conversion ?
- To: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Subject: Re: How to disable incorrect conversion ?
- From: Ruslan Shevchenko <Ruslan at Shevchenko dot Kiev dot UA>
- Date: Tue, 26 May 1998 02:29:43 +0300
- CC: rssh at grad dot kiev dot ua, egcs at cygnus dot com
- Organization: GlavAPU
- References: <35686191.3E505CB5@Shevchenko.Kiev.UA> <199805252255.AAA21464@mira.isdn.cs.tu-berlin.de>
- Reply-To: rssh at grad dot kiev dot ua
Martin von Loewis wrote:
> > This behavior of compiler is *very incorrect*.
> > becouse we do casting to non-const object, which
> > implies doing copy-conversion. (which cause memory leak)
>
> Could you please provide an example, showing what goes wrong?
>
It is omniBroker (ftp://fto.ooc.com/pub/omniBroker/2.0/OB-2.0.4.tar.gz)
problem in conversion from CORBA_String_var to const char*
It work with egcs-1.0.2 quite good.
Interesting, that now, egcs core dumps, while compiling with -Ox, x>0
or doing infinity loop with -O0.
( during parsing of CORBA_String_var + CORBA_String_var).
I will try to write small examples, which illustrate the problem during
next few days, if you need.
If you would look on this problem, please, contact with me.
> Without that example, I'd believe that the compiler is right and your
> code is wrong.
>
Yes, of course.
But generation of warning, which coused by specific optimization without
swith for
disabling this optimization, IMHO, is not good behavior for compiler.
> Martin
P.S. (Hmm, really I'm not shure that it was copy-conversion.
but I can't to test this, becouse I can't compile OmniBroker)
So, inform me if you would look on problem.
Thanks.
--
@=
//RSSH mailto:Ruslan@Shevchenko.Kiev.UA
CORBA in Ukraine & ex-USSR: http://www.corbadev.kiev.ua