#pragma 的含义[2]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 abaowu 的 blog

bsp;loop_opt(on)            //  激活  
#pragma  loop_opt(off)    //  终止  
有时,程序中会有些函数会使编译器发出你熟知而想忽略的警告,如“parameter  xxx  is  never  used  in  function  xxx”,可以这样:  
#pragma  warn  —100            //  turn  off  the  warning  message  for  warning  #100  
int  insert_record(rec  *r)  
{  /*  function  body  */  }  
#pragma  warn  +100                        //  turn  the  warning  message  for  warning  #100  back  on  
函数会产生一条有唯一特征码100的警告信息,如此可暂时终止该警告。  
每个编译器对#pragma的实现不同,在一个编译器中有效在别的编译器中几乎无效。可从编译器的文档中查看。  

本文关键:#pragma 的含义
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top