This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to disable incorrect conversion ?


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]