Disabling warning C3303: Implicit concatenation of strings

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

Disabling warning C3303: Implicit concatenation of strings

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

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

View solution in original post

0 Kudos
2 Replies
440 Views
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 Kudos
439 Views
StevieG
Contributor I
That works an absolute treat, many thanks for your help.
0 Kudos