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


begin 0644 server2.c
M+RH-"B`J('-E<G9E<BYC("TM(&$ <W1R96%M('-O8VME="!S97)V97( 9&5M

M+RH :70 :6YC;'5D92`H<W1R:6YG+F L('-T9&QI8BP <W1D:6\N:"D *B\-

M=61E(#QS>7,O='EP97,N:#X-"B-I;F-L=61E(#QN971I
M:6YC;'5D92`\<WES+W-O8VME="YH/ T*(VEN8VQU9&4 /'-Y<R]W86ET+F ^



M($U94$]25"`S-#DP("` ("\J('1H92!P;W)T('5S97)S('=I;&P 8F4 8V]N

M;6%N>2!P96YD:6YG(&-O;FYE8W1I;VYS('%U975E('=I;&P :&]L9"`J+PT*




M:68-" T*=F]I9"!F:6QL*'5N<VEG;F5D(&-H87( *F8L('5N<VEG;F5D(&-H
M87( 8RD >R`O*B!F(&ES(&9;.%T *B\-"B!F6S!=(#T *"AC("8 ,2D /3T 


M(#T
M-BD /3T ,38 /R`R-34 .B`P*3L-"B!F6S5=(#T *"AC("8 ,S(I(#T


M?0T*=F]I9"!F:6QL,S(H=6YS:6=N960 8VAA<B`J9BP =6YS:6=N960 ;&]N



M72PH8R`F(" R-34 /#P

M*B\-"G9O:60 :6YI=&-N=" I('L-"B` =6YS:6=N960 :2P 8RP ;CL-"B` 
M=6YS:6=N960 8VAA<B!F6SA=.PT*("!F;W( *&D],#L :3PR-38[:2LK*2![

M8RLK*0T*("` ("` ("` (&EF*&9;8UTI(&XK*SL-"B` ("` (&EF("AN(#X 


M("` ("` 8VYT6VE=(#T ,#L-"B` ?0T*?0T*=6YS:6=N960 8VAA<B!E;7!T
M>2AU;G-I9VYE9"!C:&%R("IF*2![("\J(&8 :7, 9ELX72`J+PT*(')E='5R
M;B`H8VYT6V9;,%U=('P *&-N=%MF6S%=72`\/"`Q*2!\("AC;G1;9ELR75T 
M/#P ,BD ?"`H8VYT6V9;,UU=(#P

M8VYT6V9;-UU=(#P

M(" H=6YS:6=N960 ;&]N9REE;7!T>2 F9ELP72D ?"`H*'5N<VEG;F5D(&QO
M;F<I96UP='DH)F9;.%TI(#P
M<'1Y*"9F6S$V72D /#P ,38I('P *"AU;G-I9VYE9"!L;VYG*65M<'1Y*"9F
M6S(T72D /#P



M3E5,3#L-

M("!K+3YN97AT(#T 3E5,3#L-"B` (&DK*SL-"B` (&9P(#T 9F]P96XH(FUA
M>')A;2YI;FDB+"`B=R( *3L-"B` (&9P<FEN=&8H9G`L("(E;'4B+"!I*3L-

M("$]($Y53$PI('L-"B` ("` :68 *"AT(#T *&MI;&\ *BEM86QL;V,H<VEZ
M96]F*&MI;&\I*2D (3T 3E5,3"D >PT*("` ("` ("!T+3YN97AT(#T :SL-

M("4 ,BD /3T ,"D >PT*("` ("` ("!F<"`](&9O<&5N*")M87AR86TN:6YI

M("` ("` 9F-L;W-E*&9P*3L-"B` ("` ("` ?0T*("` ("` ("!E;'-E('L-
M"B` ("` ("` 9G` /2!F;W!E;B B;6%X<F%M+F)A:R(L(")W(B`I.PT*("` 


M>PT*("` ("!T(#T :RT^;F5X=#L-"B` ("` 9G)E92AK*3L-"B` ("` :R`]

M*&EN="!?7V9D+"!C:&%R("I?7V)U9BP <VEZ95]T(%]?;BP :6YT(%]?9FQA



M<V4 :68 *&YU;6)Y=&5S(#P

M("` ("` ("` ("` (&EF(" H;G5M8GET97, /2!R96-V*%]?9F0L)E]?8G5F
M6U]?;BUR96U=+')E;2PP*2D /3T +3$I('L-"B` ("` ("` ("` ("` ("` 
M('!E<G)O<B`H(G)E8W8B*3L-"B` ("` ("` ("` ("` ("` (')E='5R;B`H
M+3$I.PT*("` ("` ("` ("` ("` ?0T*("` ("` ("` ("` ("` <F5M("T]


M("!S=')U8W0 <V]C:V%D9')?:6X ;7E?861D<CL ("` +RH ;7D 861D<F5S
M<R!I;F9O<FUA=&EO;B`J+PT*("!S=')U8W0 <V]C:V%D9')?:6X =&AE:7)?
M861D<CL +RH 8V]N;F5C=&]R)W, 861D<F5S<R!I;F9O<FUA=&EO;B`J+PT*
M("!I;G0 ("` <V]C:V9D+"!N97=?9F0[("`O*B!L:7-T96X ;VX <V]C:U]F

M<VEZ93L-"B` =6YS:6=N960 8VAA<B!F6S,R72P 8V]D93L-"B` :6YT(&YU



M*'-O8VMF9"`]('-O8VME="A!1E])3D54+"!33T-+7U-44D5!32P ,"DI(#T]



M7W!O<G0 /2!H=&]N<RA-65!/4E0I.R` ("` +RH <VAO<G0L(&YE='=O<FL 
M8GET92!O<F1E<B`J+PT*("!M>5]A9&1R+G-I;E]A9&1R+G-?861D<B`]($E.
M041$4E]!3ED[("\J(&%U=&]M871I8V%L;'D 9FEL;"!W:71H(&UY($E0("HO


M<V]C:V9D+"`H<W1R=6-T('-O8VMA9&1R("HI)FUY7V%D9'(L('-I>F5O9BAS
M=')U8W0 <V]C:V%D9'(I*2`]/2`M,2D-"B` >PT*("` ('!E<G)O<B`H(F)I

M;V-K9F0L($)!0TM,3T<I(#T

M<VEZ96]F("AS=')U8W0 <V]C:V%D9')?:6XI.PT*("!W:&EL92 Q*2` ("\J

M="`H<V]C:V9D+"AS=')U8W0 <V]C:V%D9'(J*29T:&5I<E]A9&1R+"AS;V-K




M(" B<V5R=F5R.B!G;W0 8V]N;F5C=&EO;B!F<F]M("5S7&XB+&EN971?;G1O

M=F5R.B!G;W0 8V]N;F5C=&EO;BX 4V5N9&EN9R!I;F9O+BXN7&XB*3L-"B` 
M("`-"B` ("!I9B`H<V5N9"AN97=?9F0L(&%R9W9;,5TL('-T<FQE;BAA<F=V

M("!I9B`H*&YU;6)Y=&5S(#T <F5C=BAN97=?9F0L("AC:&%R("HI9BP ."P 
M,"DI(#T






M("\J($]N($1E=&5R;6EN92!I8VD ;&4 ;6%X:6UU;2!D92!M96UO:7)E(%)!

M='1E('9A;&5U<B!A=2!C;&EE;G0 <75I(&PG82!D96UA;F1E+B`J+PT*("` 
M("` ("!I/4UA>$%L;&]C*&%T;VPH87)G=ELQ72DI.PT*("` ("` ("!F:6QL
M,S(H9BQI*3L-"B` ("` ("` :68 *'-E;F0H;F5W7V9D+"`H8VAA<B`J*68L

M("` ("` (&)R96%K.PT*("` (&-A<V4 ,CH-"B` ("` ("` 5W)I=&583U(H
M*3L-"B` ("` ("` ;F5T+DEN:71I86Q"=6EL9"AA=&]L*&%R9W9;,5TI+$Y5


M(&-A<V4 -#H-"B` ("` ("` 86)C/6YE="Y,=D-O=6YT0V]N;D9A<W0H*3L-
M"B` ("` ("` 9&5F/6YE="Y,=D-O=6YT0V]N;D4H*3L-"B` ("` ("` 9V< 


M96%K.PT*("` (&-A<V4 -3H-"B` ("` ("` <&YL=B`](&YE="Y%=F%L33$H





M(&9I;&PH9BQA<F=V6S)=6S!=*3L-"B` ("` ("` :68 *'-E;F0H;F5W7V9D
M+"!F+"`X+"`P*2`]/2`M,2D-"B` ("` ("` ("!P97)R;W( *")S96YD(BD[

M*BEF+"`X+"`P*2D /3T +3$I('L-"B` ("` ("` ("!P97)R;W( *")R96-V


M("` ("!E;'-E(&EF("AN=6UB>71E<R`A/2`X*0T*("` ("` ("` ("` ("` 
M<&5R<F]R*")N=6UB>71E<R!E<G)O<B$B*3L-" T*("` ("` ("!C;V1E(#T 



M*&-H87( *BEF+"`S,BP ,"DI(#T
M(" B<F5C=B(I.PT*("` ("` ("` ('-H=71D;W=N*'-O8VMF9"P ,BD[(&-L


M("` ("` ("` <&5R<F]R*")N=6UB>71E<R!E<G)O<B$B*3L-" T*("` ("` 

M(')E8V5I=F5D/25L9%QN(BQC;V1E,S(I.PT*("` ("` ("!P<FEN=&8H(E5P

M;&4B+"`B=V(B*3L *B\-"B` ("` ("` 9G`R(#T ;W!E;B B=&UP9FEL92(L

M(&D (#T 8V]D93,R.R`-"B` ("` ("` <')I;G1F*")I/25L=5QN(BP :2D[

M96-6*&YE=U]F9"P *&-H87( *BEF+"`X+"`P*2`]/2`M,2D >PT*("` ("` 
M("` ("` ("` ('!E<G)O<B`H(G)E8W8B*3L-"B` ("` ("` ("` ("` ("!C

M,BD[(&-L;W-E("AN97=?9F0I.PT*("` ("` ("` ("` ("` ('-H=71D;W=N
M*'-O8VMF9"P ,BD[(&-L;W-E("AS;V-K9F0I.PT*("` ("` ("` ("` ("` 
M(')E='5R;B`H+3$I.PT*("` ("` ("` ("` ('T-"B` ("` ("` ("` ("!C
M;V1E(#T






M('%U:70 9F]R(')E8F]O="`J+PT*("` ('T-" T*("` ('-H=71D;W=N*&YE



`
end
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