Turn off compiler warnings

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

Turn off compiler warnings

579 Views
michaelkaufman
Contributor I

I am using CodeWarrior 10.6 for ColdFire. I am wondering if there is a way to turn off specific warning either by command line option or by means of pragmas. The pragma warning doesn't seem to do the work. Is there something I missed, or there is no way to turn off specific warning with Freescale compiler for ColdFire?

Labels (1)
0 Kudos
3 Replies

404 Views
miduo
NXP Employee
NXP Employee

Hi,

Yes, You can use “#pragma OPTION: Additional Options” to "partial " of Compiler throughout code.

Syntax
#pragma OPTION ADD [<Handle>] "<Option>"
#pragma OPTION DEL <Handle>
#pragma OPTION DEL ALL

Description
Options are added inside of the source code while compiling a file.
The options given on the command line or in a configuration file cannot be changed in any way.
Additional options are added to the current ones with the ADD command. A handle may be given optionally.
The DEL command either removes all options with a specific handle. It also uses the ALL keyword to remove all added options regardless if they have a handle or not. Note that you only can remove options which were added previously with the OPTION ADD pragma.
All keywords and the handle are case-sensitive.

0 Kudos

404 Views
michaelkaufman
Contributor I

Hi Fang,

Pragma option doesn't seem to be supported by ColdFire compiler (gives "(10186) illegal #pragma" warning). Also there is no option for switching off specific warning as far as I understand.

0 Kudos

404 Views
TomE
Specialist II

This may be a CodeWarrior question more than one specific to the ColdFire parts.

Have you searched the CodeWarrior forums? Something like this may help:

https://community.freescale.com/message/597627#comment-597627

Tom