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的实现不同,在一个编译器中有效在别的编译器中几乎无效。可从编译器的文档中查看。