Pragmas

Pragma support in GCC is minimal and thus you are recommended to use function attributes. The following are the common pragmas that GCC supports with their CodeWarrior equivalent, if applicable.

Table 1. Equivalent Pragmas
CodeWarrior GCC
#pragma opt_classresults  
#pragma BeginErrorCheck  
#pragma EndErrorCheck  
#pragma cpp_extensions  
#pragma optimization_level 0|1|2|3|4 #pragma GCC optimize ("string"...)
#pragma push #pragma GCC push_options
#pragma pop #pragma GCC pop_options
  #pragma GCC reset_options
#pragma push_marcro("macro_name") #pragma push_macro("macro_name")
#pragma pop_macro("macro_name") #pragma pop_macro("macro_name")
#pragma message ("string") #pragma message string
  #pragma weak symbol
  #pragma weak symbol1 = symbol2
#pragma pack(n) #pragma pack(n)
  #pragma long_calls
  #pragma no_long_calls
  #pragma long_calls_off