This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Disable compiler warning

How do you disable compiler warnings in uVision 4? It's for a K20 procesor so it's an ARM Cortex M4. I tried the standard C++ #pragma warning but it didn't sppear to work...

Parents
  • There are no standard C++ #pragma warning handling, even if the #pragma keyword is standard.

    #pragma itself may be standard, but the rest of the line isn't standard.

    #pragma is an official way to specify compiler-specific attributes to a compiler.

    So whenever you want to use #pragma, you need to locate the #pragma documentation for the specific compiler. Not only that - quite a number of compilers think they are "clever" and will generate warnings for unknown #pragma use - so many compilers will even require that you quality your #pragma use within #ifdef blocks if you want silent builds using multiple compilers.

Reply
  • There are no standard C++ #pragma warning handling, even if the #pragma keyword is standard.

    #pragma itself may be standard, but the rest of the line isn't standard.

    #pragma is an official way to specify compiler-specific attributes to a compiler.

    So whenever you want to use #pragma, you need to locate the #pragma documentation for the specific compiler. Not only that - quite a number of compilers think they are "clever" and will generate warnings for unknown #pragma use - so many compilers will even require that you quality your #pragma use within #ifdef blocks if you want silent builds using multiple compilers.

Children