LPUART GCC extension warning

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

LPUART GCC extension warning

ソリューションへジャンプ
292件の閲覧回数
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 解決策
266件の閲覧回数
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 返信
267件の閲覧回数
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 件の賞賛