Compiler Warnings with "-Wpedantic"

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

Compiler Warnings with "-Wpedantic"

300 Views
Masmiseim
Senior Contributor I

Hello NXP team,

 

could you test the target code for Freemaster (the one running on the microcontroller) with higher warning levels and make it warning-free? May I recommend the following warning flags:

-Wall

-Wextra

-Wpedantic

 

The code raises several Compiler-Warnings with the warning-settings from above. The following three warnings, lead to linker errors when LTO is activated:

Masmiseim_0-1725635176108.png

The following linker Errors with LTO active are created when the warnings are not solved:

Masmiseim_1-1725635176109.png

Yes, at first glance these seem to have nothing to do with the warnings. It took me a while to understand the problem.

GCC13 was used on iMXRT1170.

 

Thanks and best regards

1 Reply

211 Views
Prof_Farnsworth
Contributor I

I agree

To add to this, I also suggest to remove warnings generated with -Wundef (which seems not to be included in -Wall?)as the Freemaster header files checks a lot of potentially undefined precompiler constants.

0 Kudos
Reply