www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - weird compilation error - server2.c

reply trembb22 <trembb22_member pathlink.com> writes:
C:\dm>dmc -cpp -ml -0 server2.c wattcpdl.lib -oserver2.exe
lv.h(10346) : Warning 2: possible unintended assignment
lv.h(10422) : Warning 2: possible unintended assignment
Internal error: cod1 1280
--- errorlevel 1

I also had to include io.h to resolv declaration error about open and close.

I attach the server2.c program...

Benoit
Nov 24 2004
parent reply trembb22 <trembb22_member pathlink.com> writes:
This is the if line 10400 something that gave an error, IdFctIntType is a simple
vector.

while (pc != NULL) {
next = pc->ELGETJUMP();
if ( (htDC = (IdFctIntType[h = pc->FctIntHandlerId()]== DC) ) )
psn = pc->info.GetSnPtr();
else .
Nov 24 2004
parent reply trembb22 <trembb22_member pathlink.com> writes:
The code below is right cause the conditional result is being kept into htDC for
later usage.

The code compiled well with djgpp, linux gcc and intel icc.


In article <co30kh$15i$1 digitaldaemon.com>, trembb22 says...
This is the if line 10400 something that gave an error, IdFctIntType is a simple
vector.

while (pc != NULL) {
next = pc->ELGETJUMP();
if ( (htDC = (IdFctIntType[h = pc->FctIntHandlerId()]== DC) ) )
psn = pc->info.GetSnPtr();
else .

Nov 24 2004
parent reply trembb22 <trembb22_member pathlink.com> writes:
so, back to scare one:

C:\dm>dmc -cpp -ml -0 server2.c wattcpdl.lib
lv.h(10346) : Warning 2: possible unintended assignment
lv.h(10422) : Warning 2: possible unintended assignment
Internal error: cod1 1280
--- errorlevel 1

what is the internal error: cod1 1280 ???

Benoit

In article <co35pj$7um$1 digitaldaemon.com>, trembb22 says...
The code below is right cause the conditional result is being kept into htDC for
later usage.

The code compiled well with djgpp, linux gcc and intel icc.


In article <co30kh$15i$1 digitaldaemon.com>, trembb22 says...
This is the if line 10400 something that gave an error, IdFctIntType is a simple
vector.

while (pc != NULL) {
next = pc->ELGETJUMP();
if ( (htDC = (IdFctIntType[h = pc->FctIntHandlerId()]== DC) ) )
psn = pc->info.GetSnPtr();
else .


Nov 24 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"trembb22" <trembb22_member pathlink.com> wrote in message
news:co36pn$970$1 digitaldaemon.com...
 so, back to scare one:

 C:\dm>dmc -cpp -ml -0 server2.c wattcpdl.lib
 lv.h(10346) : Warning 2: possible unintended assignment
 lv.h(10422) : Warning 2: possible unintended assignment
 Internal error: cod1 1280
 --- errorlevel 1

 what is the internal error: cod1 1280 ???

It's a bug in the compiler. I can fix it. The other two are just warnings, you can ignore them if you prefer.
Dec 04 2004
parent trembb22 <trembb22_member pathlink.com> writes:
I have more information about the internal error of the digital mars
compiler. Here the simple code that produce the internal error and some
explanation.

UINTCALL FctIntHandlerId(void) {
//static int Gap = GetFctIntGap();
static int Gap=1;
if (IdFctInt != NULL)
return IdFctInt[(uFV - FirstFctIntAddr) / Gap /*FctIntGap*/ ];
else
return FctIntHandlerId2TD();	// was: FctIntHandlerId2() 16juil03
}

if I uncomment "static int Gap = GetFctIntGap();" I got an internal error at
compile time.
if a put everyting under comment inside GetFctIntGap(); then I still got the
internal error. 
If a comment like above than they is no more internal error.

So, the issue is about executiong GetFctIntGap only one time with the
static variable assigment that alwayse initalised only one time. Assigning a
value is ok but it is producing a internal error if the static variable
assigment come from a function callback.

that was a tuff one to isolate...

Benoit

In article <coto27$ipd$1 digitaldaemon.com>, Walter says...
"trembb22" <trembb22_member pathlink.com> wrote in message
news:co36pn$970$1 digitaldaemon.com...
 so, back to scare one:

 C:\dm>dmc -cpp -ml -0 server2.c wattcpdl.lib
 lv.h(10346) : Warning 2: possible unintended assignment
 lv.h(10422) : Warning 2: possible unintended assignment
 Internal error: cod1 1280
 --- errorlevel 1

 what is the internal error: cod1 1280 ???

It's a bug in the compiler. I can fix it. The other two are just warnings, you can ignore them if you prefer.

Dec 04 2004