Message disable pragma doesn't disable

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Message disable pragma doesn't disable

跳至解决方案
1,914 次查看
bigmac
Specialist III

Hello,

 

I am using CW 6.3 for HCS08 devices.  I am intentionally using implicit concatenation by breaking some constant string  initialisation data into a number of sections, for documentation reasons.  I have therefore attempted to use a pragma to disable these warning message generated by the compiler.  But so far, I have not been able to suppress the messages.

 

I have the following code:

 

#pragma MESSAGE DISABLE C3303 /* WARNING C3303: Implicit concatenation of strings */// Initial default system configuration:const byte dflt_config[] = "\0\x40"     // Baud index, config byte                           "B0123464"   // Pager default                           "B0123480"   // Display default                           "\xFF";      // Initialised flag

 

This gives me the string data that I require, but persists in generating a warning corresponding to each of three lines.  Can anyone offer any suggestions - perhaps I am incorrectly applying the pragma?.

 

Regards,

Mac

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,059 次查看
CompilerGuru
NXP Employee
NXP Employee

You have to disable that message via command line option, not with a #pragma MESSAGE.

Here's a snipped copied from the compiler manual entry about that pragma:

 

> NOTE This pragma does not affect messages produced during preprocessing,

>  because pragma parsing is done during normal source parsing but not during preprocessing.

 

Daniel

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,060 次查看
CompilerGuru
NXP Employee
NXP Employee

You have to disable that message via command line option, not with a #pragma MESSAGE.

Here's a snipped copied from the compiler manual entry about that pragma:

 

> NOTE This pragma does not affect messages produced during preprocessing,

>  because pragma parsing is done during normal source parsing but not during preprocessing.

 

Daniel

0 项奖励
回复