LPUART GCC extension warning

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPUART GCC extension warning

跳至解决方案
305 次查看
akhilranga
Contributor IV

Hi there,

Can some one please help me understand the reason for this warning. I am attaching the image below. 

LPUART GCC extension warning. I am using the same file in different code with out any such warning. I wanted to understand the reason for this warning. So any insights would be helpful . Thank you

Screenshot (240).png

0 项奖励
1 解答
279 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @akhilranga,

C supports only int, unsigned int, and _Bool as types for bit-fields. Other types are implementation defined.

Using the flag -Wpedantic the compiler will follow the standard strictly and will try to warn you if you use certain implementation-defined features or extensions, it warns for some uses of language extensions that the compiler otherwise considers normal but that can make the program non-portable to other compilers. This code may not compile with another compiler.

You can disable this flag by going to "Properties > C/C++ Build > Settings > Standard S32DS C Compiler > Warnings". 

Julin_AragnM_0-1712252160623.png

Best regards,
Julián

在原帖中查看解决方案

0 项奖励
1 回复
280 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @akhilranga,

C supports only int, unsigned int, and _Bool as types for bit-fields. Other types are implementation defined.

Using the flag -Wpedantic the compiler will follow the standard strictly and will try to warn you if you use certain implementation-defined features or extensions, it warns for some uses of language extensions that the compiler otherwise considers normal but that can make the program non-portable to other compilers. This code may not compile with another compiler.

You can disable this flag by going to "Properties > C/C++ Build > Settings > Standard S32DS C Compiler > Warnings". 

Julin_AragnM_0-1712252160623.png

Best regards,
Julián

0 项奖励