Message disable pragma doesn't disable

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Message disable pragma doesn't disable

ソリューションへジャンプ
1,649件の閲覧回数
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 解決策
794件の閲覧回数
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 返信
795件の閲覧回数
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 件の賞賛
返信