[omniORB] Re: omniIdl's _sk_XXX::dispatch if ... else nesting

Sai-Lai Lo S.Lo@uk.research.att.com
24 Sep 1999 10:59:53 +0100


This sounds reasonable. I'll put the change into 2.8.0.

Sai-Lai

>>>>> Peter Bauer writes:

> When an interface has a pathological large 
> number of members, then VC++ 5.0 and 6.0 abort 
> compilation of the idl-stub with:
>   fatal error C1061: compiler limit : blocks nested too deeply

> This is a result from the deeply nested 
>   if (strcmp(_0RL_op,"m1") == 0)
>   {
>     ...
>     return 1;
>   }
>   else if (strcmp(_0RL_op,"m2") == 0)
>   {
>     ...
>     return 1;
>   }
>   else if (strcmp(_0RL_op,"m3") == 0)
>   {
>     ...
>     return 1;
>   }
>   ...
>   and so on

>   If the else's are omitted, there is no problem to compile
>   the stub. I think there should be no problem to remove 
>   the else's, because if an if matches, the executed block 
>   returns always (at least I found that the only procedure im-
>   plementing this is produce_server_wr_skel, which alwys emits
>   a return 1;)



-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND