/GX compiler option



 DEVELOP > c-Plus-Plus > /GX compiler option

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Param"
Date: 01 Aug 2003 02:04:46 AM
Object: /GX compiler option
This is a multi-part message in MIME format.
------=_NextPart_000_0084_01C35829.4AE682B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi ,=20
I have faced a strange problem. I have a code something like this...
while(!a)
{
if( condition )
{
continue; // 1=20
}
try
{
if ( condition )
{
if( some more condition )
{
a =3D 1;
continue; // 2
}=20
else
{
continue; // 3
} =20
}
else
{
}
}// end try
catch(...)
{
} // end catch
}// end while
=20
In this piece of code with the continue keyword used i expect it to go =
back to the outer while... This happens in all the if statements for =
e.g. with the continue 1.
But the presence of continue keyword in the try block gave me an =
INTERNAL COMPILER ERROR . This got solved when i gave a preprocessor =
option called /Gx. This was prompted to me as a warnig by the compiler =
which solved this problem.=20
Now i have not understood why was this an error and how does /Gx option =
help in that .
Thanks
Param
------=_NextPart_000_0084_01C35829.4AE682B0
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi , </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; I have faced a strange =
problem.&nbsp;=20
I have a code something like this...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>while(!a)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>{</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; if( condition )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; continue;=20
//&nbsp;1&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; try</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( =
condition=20
)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if( some more=20
condition )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a=20
=3D 1;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
continue;&nbsp; // 2</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
else</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
continue; //=20
3</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}&nbsp;=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; =
else</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; }// end try</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; catch(...)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; } // end catch</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}// end while</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In this piece of code with the =
<STRONG>continue=20
</STRONG>keyword used i expect it to go back to the outer while... This =
happens=20
in all the if statements for e.g. with the continue 1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>But the presence of continue keyword in =
the try=20
block gave me an INTERNAL COMPILER ERROR . This got solved when i gave a =
preprocessor option called /Gx. This was prompted to me as a warnig by =
the=20
compiler which solved this problem. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Now i have not understood why was this =
an error and=20
how does /Gx option help in that .</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Param</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>
------=_NextPart_000_0084_01C35829.4AE682B0--
.

User: "Michiel Salters"

Title: Re: /GX compiler option 01 Aug 2003 04:13:59 AM
"Param" <secparam@yahoo.com> wrote in message news:<bgd39v$1os$1@news.mch.sbs.de>...

Hi ,
I have faced a strange problem. I have a code something like this...
while(!a)

....


In this piece of code with the continue keyword used i expect it to go
back to the outer while... This happens in all the if statements for
e.g. with the continue 1.
But the presence of continue keyword in the try block gave me an
INTERNAL COMPILER ERROR . This got solved when i gave a preprocessor
option called /Gx. This was prompted to me as a warnig by the compiler
which solved this problem.

We can't help you, this group is only about standard C++ and that
doesn't specify compiler options. You don't even say which compiler,
so we can't point you to the right group for that compiler. Google
can tell you that if you tell it what compiler you have.
Regards,
--
Michiel Salters
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER