LPUART GCC extension warning

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

LPUART GCC extension warning

Jump to solution
1,639 Views
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 Kudos
Reply
1 Solution
1,613 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
1,614 Views
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 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1840466%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPUART%20GCC%20extension%20warning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1840466%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3ECan%20some%20one%20please%20help%20me%20understand%20the%20reason%20for%20this%20warning.%20I%20am%20attaching%20the%20image%20below.%26nbsp%3B%3C%2FP%3E%3CP%3ELPUART%20GCC%20extension%20warning.%20I%20am%20using%20the%20same%20file%20in%20different%20code%20with%20out%20any%20such%20warning.%20I%20wanted%20to%20understand%20the%20reason%20for%20this%20warning.%20So%20any%20insights%20would%20be%20helpful%20.%20Thank%20you%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20(240).png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%20(240).png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F271885i18B8BD86FFFF7C24%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20(240).png%22%20alt%3D%22Screenshot%20(240).png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1840934%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART%20GCC%20extension%20warning%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1840934%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F203425%22%20target%3D%22_blank%22%3E%40akhilranga%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EC%20supports%20only%20int%2C%20unsigned%20int%2C%20and%20_Bool%20as%20types%20for%20bit-fields.%20Other%20types%20are%20implementation%20defined.%3C%2FP%3E%0A%3CP%3EUsing%20the%20flag%20-Wpedantic%20the%20compiler%20will%20follow%20the%20standard%20strictly%20and%20will%20try%20to%20warn%20you%20if%20you%20use%20certain%20implementation-defined%20features%20or%20extensions%2C%20it%3CSPAN%3E%26nbsp%3Bwarns%20for%20some%20uses%20of%20language%20extensions%20that%20the%20compiler%20otherwise%20considers%20normal%20but%20that%20can%20make%20the%20program%20non-portable%20to%20other%20compilers.%26nbsp%3B%3C%2FSPAN%3EThis%20code%20may%20not%20compile%20with%20another%20compiler.%3C%2FP%3E%0A%3CP%3EYou%20can%20disable%20this%20flag%20by%20going%20to%20%22Properties%20%26gt%3B%20C%2FC%2B%2B%20Build%20%26gt%3B%20Settings%20%26gt%3B%20Standard%20S32DS%20C%20Compiler%20%26gt%3B%20Warnings%22.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Julin_AragnM_0-1712252160623.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Julin_AragnM_0-1712252160623.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F272080i1B41EBB626E6BD13%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Julin_AragnM_0-1712252160623.png%22%20alt%3D%22Julin_AragnM_0-1712252160623.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E