Enums changing sign

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ShM_1238346
Level 1
Level 1

Hi,

I am using PSoC 5.

I am trying to use "#pragma enumsalwaysint off" for selectively turning on/off the sign of the enums,

I using C99.

When I use the pragma and compile , I get the following message.

"warning: ignoring #pragma enumsalwaysint off [-Wunknown-pragmas]"

Why am I getting the warning? What is the best way to selectively turn on/off the sign of the enums?

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

C99 is supported but "#pragma enumsalwaysint off" is not a part of the definition. You need to use header guards in such cases as mentioned in the thread linked below: #pragma once?

Regards,

Dheeraj

View solution in original post

0 Likes
2 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

C99 is supported but "#pragma enumsalwaysint off" is not a part of the definition. You need to use header guards in such cases as mentioned in the thread linked below: #pragma once?

Regards,

Dheeraj

0 Likes