Re: Migration from solaris(CC) to GCC of RHEL
vinaykumar ps <[email protected]> Tue, 4 Sep 2012 17:39:55 +0530
| Newsgroups | gmane.linux.redhat.migration |
|---|---|
| Message-ID | <CALxpsO7SXRL0eOAj0mNFeEUVfUBUFk5hP-_RqTvOCFz=GX9Sog@mail.gmail.com> |
--===============8694715485619038682== Content-Type: multipart/alternative; boundary=f46d04427108def52804c8df22f6 --f46d04427108def52804c8df22f6 Content-Type: text/plain; charset=ISO-8859-1 Hi, For example in GCC, char* ptr = (myClass.getObject()).getAddress(); The ptr cannot be used as the object returned by getObject would have been destroyed and the ptr is invalid. This works find in CC as the copy constructor is invoked. I wanted to find such runtime errors. Or in other words Compiler dependent code. - Vinay On Tue, Sep 4, 2012 at 5:32 PM, rajatjpatel <[email protected]> wrote: > VinayKumar, > > not understood u r question > Regards, > Rajat Patel > > http://studyhat.blogspot.com > FIRST THEY IGNORE YOU... > THEN THEY LAUGH AT YOU... > THEN THEY FIGHT YOU... > THEN YOU WIN... > > > > > On Tue, Sep 4, 2012 at 4:55 PM, vinaykumar ps <[email protected]>wrote: > >> Hello, >> >> Is there a way to find out the runtime changes that will occur in >> GCC/RHEL compared to CC/Solaris >> >> - Vinay >> >> _______________________________________________ >> Redhat-migration-list mailing list >> [email protected] >> https://www.redhat.com/mailman/listinfo/redhat-migration-list >> > > --f46d04427108def52804c8df22f6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,<div><br></div><div>For example in GCC,=A0</div><div>ch= ar* ptr =3D (myClass.getObject()).getAddress();</div><div>The ptr cannot be= used as the object returned by getObject would have been destroyed and the= ptr is invalid. This works find in CC as the copy constructor is invoked.<= /div> <div><br></div><div>I wanted to find such runtime errors. Or in other words= Compiler dependent code.</div><div><br></div><div>- Vinay<br><br><div clas= s=3D"gmail_quote">On Tue, Sep 4, 2012 at 5:32 PM, rajatjpatel <span dir=3D"= ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">rajatjp= [email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">VinayKumar,<div><br></div><div>not understoo= d u r question=A0<br clear=3D"all">Regards,<br>Rajat Patel<br><br><a href= =3D"http://studyhat.blogspot.com/" target=3D"_blank">http://studyhat.blogsp= ot.com</a><br> FIRST THEY IGNORE YOU...<br> THEN THEY LAUGH AT YOU...<br>THEN THEY FIGHT YOU...<br>THEN YOU WIN...<br><= br><br> <br><br><div class=3D"gmail_quote"><div><div class=3D"h5">On Tue, Sep 4, 20= 12 at 4:55 PM, vinaykumar ps <span dir=3D"ltr"><<a href=3D"mailto:psvina= [email protected]" target=3D"_blank">[email protected]</a>></span>= wrote:<br> </div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo= rder-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"h5"> <div dir=3D"ltr">Hello,<div><br>Is there a way to find out the runtime chan= ges that will occur in GCC/RHEL compared to CC/Solaris</div><div><br></div>= <div>- Vinay</div></div> <br></div></div>_______________________________________________<br> Redhat-migration-list mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Redha= [email protected]</a><br> <a href=3D"https://www.redhat.com/mailman/listinfo/redhat-migration-list" t= arget=3D"_blank">https://www.redhat.com/mailman/listinfo/redhat-migration-l= ist</a><br></blockquote></div><br></div> </blockquote></div><br></div></div> --f46d04427108def52804c8df22f6-- --===============8694715485619038682== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Redhat-migration-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/redhat-migration-list --===============8694715485619038682==--