[omniORB] Problem of CORBA::String in MFC Application

Guy Trudel gtrudel@mediatrix.com
Fri, 26 Nov 1999 15:03:58 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BF3849.6486A6C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I always thought that string literals were <const char*> until few =
weeks ago
when I started testing OmniOrb 2.8=20
So with msdev compiler string literal are char*, so everyone using =
string
literal directly with string_var should be careful.
=20
Does the C++ ansi standard reflect this ISO C++ compiler string =
literals
rules ? I have here the Annotated C++ Reference from Stroustrup (from =
april
1995) and it says that string literals are of type char[] and not const
char[] for compatibility with classic C.  I hope this has changed, =
because
it makes more sense to be const char[]. You can email me directly =
(since
it's really not an omniorb question).=20
=20
Thank you,
Guy Trudel
=20
 -----Original Message-----
From: Diego Roig [mailto:diego.roig@grupoclave.com]
Sent: Friday, November 26, 1999 2:07 PM
To: 'Guy Trudel'; Omniorb-List (E-mail)
Subject: RE: [omniORB] Problem of CORBA::String in MFC Application



In an ISO C++ compiler string literals are of const char* type. gcc =
2.95.2
conforms the standard in that point. There=B4s an option to make them =
of type
char*. (-fwritable-strings I think)



------_=_NextPart_001_01BF3849.6486A6C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>RE: [omniORB] Problem of CORBA::String in MFC =
Application</TITLE>

<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D256003519-26111999>I=20
always thought that string literals were &lt;const char*&gt; until few =
weeks ago=20
when I started testing OmniOrb 2.8 </SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D256003519-26111999>So=20
with msdev compiler string literal are char*, so everyone using string =
literal=20
directly with string_var should be careful.</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D256003519-26111999>Does=20
the C++ ansi standard reflect this ISO C++ compiler string literals =
rules ? I=20
have here the Annotated C++ Reference from Stroustrup (from april 1995) =
and it=20
says that string literals are of type char[] and not const char[] for=20
compatibility with classic C.&nbsp; I hope this has changed, because it =
makes=20
more sense to be const char[]. You can email me directly (since it's =
really not=20
an omniorb&nbsp;question). </SPAN></FONT></DIV>
<DIV><SPAN class=3D256003519-26111999></SPAN><FONT =
face=3DTahoma></FONT>&nbsp;</DIV>
<DIV><SPAN class=3D256003519-26111999></SPAN><FONT size=3D2><FONT=20
color=3D#0000ff><FONT face=3DArial>T<SPAN =
class=3D256003519-26111999>hank=20
you,</SPAN></FONT></FONT></FONT></DIV>
<DIV><SPAN class=3D256003519-26111999></SPAN><SPAN=20
class=3D256003519-26111999></SPAN><FONT size=3D2><FONT =
color=3D#0000ff><FONT=20
face=3DArial>G<SPAN class=3D256003519-26111999>uy =
Trudel</SPAN><BR><SPAN=20
class=3D256003519-26111999>&nbsp;</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
class=3D256003519-26111999>&nbsp;</SPAN>-----Original =
Message-----<BR><B>From:</B>=20
Diego Roig [mailto:diego.roig@grupoclave.com]<BR><B>Sent:</B> Friday, =
November=20
26, 1999 2:07 PM<BR><B>To:</B> 'Guy Trudel'; Omniorb-List=20
(E-mail)<BR><B>Subject:</B> RE: [omniORB] Problem of CORBA::String in =
MFC=20
Application<BR><BR></DIV></FONT>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px"></FONT>
  <P><FONT size=3D2>In an ISO C++ compiler string literals are of const =
char*=20
  type. gcc 2.95.2 conforms the standard in that point. There=B4s an =
option to=20
  make them of type char*. (-fwritable-strings I=20
think)</FONT></P><BR></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01BF3849.6486A6C0--