Message disable pragma doesn't disable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Message disable pragma doesn't disable

Jump to solution
1,290 Views
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

Labels (1)
Tags (1)
0 Kudos
1 Solution
435 Views
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

View solution in original post

0 Kudos
1 Reply
436 Views
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 Kudos