Re: a big bug

david <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
Bug in your C code: illegal syntax (throw).


Peng Yadong(彭亚东) wrote:
> SRC: xxx.c
>
> void f()
>
> {
>
>     if(  strncmp(pIn->trans_type,"0",1)==0
>
>         || strncmp(pIn->trans_type,"1",1)==0 )
>
>      throw TDsuException(DSU_MPS_NOPERMIT, "-", "%s:%s", pIn->user_type ,
> pIn->trans_type);
>
>     else if(  strncmp(pIn->trans_type,"2",1)==0
>
>        || strncmp(pIn->trans_type,"3",1)==0
>
>       || strncmp(pIn->trans_type,"4",1)==0 )
>
>     {
>
>     m_bNeedOutList=false;
>
>     }
>
>     else
>
>         throw TDsuException(DSU_MPS_NOPERMIT, "-", "%s:%s", pIn->user_type ,
> pIn->trans_type);
>
> }
>
>  
>
>  
>
>  
>
> $ indent -kr -bap -cli4 -i4 -ts4 -l78 -ip4 -br -bls -nbbo -nlp xxx.c -o xx
>
> indent: xxx.c:6: Error:Unmatched 'else'
>
> $ indent --version
>
> GNU indent 2.2.9
>
>   
>
>  
>
> 彭亚东
>
> 广州从兴电子开发有限公司 计费研发部
>
> 电话:020-8711 6405
>
> E-Mail:[email protected]
>
>  
>
> _______________________________________________
> bug-indent mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.