Compiler warning "... with braces is non-standard"

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

Compiler warning "... with braces is non-standard"

1,371 Views
dominikbenz
Contributor I

Hello


I transformed our CodeWarrior Classic Project to a eclipse based CodeWarrior 10.6 project. When I compile the project, the "new" compiler gives me >300 times the same warning message:

 

"initializing '__regabi void (*)()' with braces is non-standard"

 

on the following definition of a task in our own written little operating system:

 

BS_FCT_AppList_typ  ap_bag2_appDef =
{
  {"BAG2"},    
  {"V34P"},    
  {"15.05.14"},
  {""},             
  {InitFct},       // Pt to function - Task initialization function
  {TaskFct},    // Pt to function - Task function
  {50}              // Int - Task interval time
};

 

The problem seems to be the {} braces arround the point to function expressions an the int.

 

Does anybody know how to disable this warning?

I don't want to change any of our existing applications because of this small non-standard mistake.

I tried to disable all Warnings listed in "Tool Settings - ColdFire Compiler -> Warnings" without success...

 

thanks!

Labels (1)
Tags (2)
0 Kudos
Reply
4 Replies

1,163 Views
TICS_Fiona
NXP Employee
NXP Employee

User can use -w off to disable the compiler warnings, like below:

disable warning.png

Fiona Kuang

Technical Information & Commercial Support

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,163 Views
dominikbenz
Contributor I

Thanks for your answer It seems that the "-w off" flag will disable all warnings. Is it possible to disable just certain warnings, for example the "braces is non-standard" warning?

0 Kudos
Reply

1,163 Views
TICS_Fiona
NXP Employee
NXP Employee

What is the version of your Classic CodeWarrior? And what is  the part number of your MCU or Processor?

0 Kudos
Reply

1,163 Views
dominikbenz
Contributor I

The IDE Version of the Classic CodeWarrior was v5.7.0. But now we use the Compiler from CodeWarrior v10.6. The Compiler Version  (mwccmcf.exe) is Version 6.0 build 3024. We use a Coldfire MCF5233.

0 Kudos
Reply