Make chc12 ignore a specific pragma

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

Make chc12 ignore a specific pragma

519 Views
jbrynas
Contributor I

Hi,

I have some code that is both built using chc12 for target but also using gcc for unit testing purposes. I need to add some pragmas to the code for the unit testing instrumenter function but then I got a warning when building with chc12 that this specific pragma wasn't handled. Is there a way to tell chc12 to ignore a specific pragma? I don't want to disable the warning since it might be useful to know if a pragma meant for chc12 is misspelled etc.

 

Regards,

Labels (1)
Tags (1)
0 Kudos
2 Replies

338 Views
kef
Specialist I

You can't make ignoring only specific unknown pragmas, but you can

 

1) temporarily disable unknown pragma warning

#pragma MESSAGE DISABLE C4201

... code with unknown pragmas

#pragma MESSAGE WARNING C4201

 

2) Use CW specific __MWERKS__ define to skip compiling unknown pragmas

#ifndef __MWERKS__

 // some uknown pragmas here

 #pragma ...

#endif

0 Kudos

338 Views
CrasyCat
Specialist III

Hello

 

No. You can either disable the message for all pragmas or keep it for all of them.

 

CrasyCat

0 Kudos