Disabling warning C3303: Implicit concatenation of strings

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

Disabling warning C3303: Implicit concatenation of strings

ソリューションへジャンプ
2,495件の閲覧回数
StevieG
Contributor I

Hi there. I have a need define a lot of strings in my C source that have several hundred characters each, so don't want to have the strings defined all on one line in the source, I want to use string concatenation, eg:

 

#define FORM_TEXT \
  "High Street\n"  \
  "Manchester\n" \
  "Roadway\n"

 

The compiler always warns of there being impiled string concatenation with warning C3303, and the help explains why it does so. The problem I have is that I can't disable this warning at all, the help says that it is generated within the preprocessor so the normal #pragma MESSAGE directive can't be used to disable it. The warning occurs every time a concatenation occurs so I get dozens of them. Is there a way to disable this warning message? Thanks.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,253件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

you cannot use the pragma as pragmas are not resolved during preprocessing time.

But you can use the compiler option

-WmsgSd3303

to disable the message.

 

BK

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,254件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

you cannot use the pragma as pragmas are not resolved during preprocessing time.

But you can use the compiler option

-WmsgSd3303

to disable the message.

 

BK

0 件の賞賛
返信
1,253件の閲覧回数
StevieG
Contributor I
That works an absolute treat, many thanks for your help.
0 件の賞賛
返信