Suppress any warning in mbed Compiler

The mbed Compiler is a very usefull development platform for microcontrollers, but sometimes you will get warning messages, some of which you know about and want to be ignored. They appear on the first lines of "Compiler output" and you need to scroll down to reach the "real" compiler errors.

You can suppress specific compiler errors and warnings by using #pragma diag_suppress in the header of your project before any include happens.

#pragma diag_suppress sets a specific warning code or multiple warning codes and the compiler will ignore those warnings.

All the error and warning codes can be found on website.


alternative link

References:, about diag_suppress tag, ARM compiler warning and error codes,

No comments:

Post a Comment