Make chc12 ignore a specific pragma

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

Make chc12 ignore a specific pragma

999件の閲覧回数
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,

ラベル(1)
タグ(1)
0 件の賞賛
返信
2 返答(返信)

818件の閲覧回数
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 件の賞賛
返信

818件の閲覧回数
CrasyCat
Specialist III

Hello

 

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

 

CrasyCat

0 件の賞賛
返信