When building the MQX libraries (CodeWarrior 10.2, MQX 3.8, Windows 7) I get tons of warnings about "#pragma opt_branchtailmerge off" being an illegal pragma. Where is __CWBUILD__ defined? Is this missing in my installation?
NeraPhil,
In CW 10.1 compiler4.3.3 version there was a bug which requested to turn off branchtailmerge optimization. Its fixed in CW 10.2 so you can remove the following check in mqx.h
#if defined(__CWBUILD__)
/* This section switches off the branchtailmerge optimization which is not
implemented correctly in the CodeWarrior C/C++ Compiler version 4.3.3
(known issue) */
#if (__CWBUILD__ >= 38) && (__CWBUILD__ <= 50)
#pragma opt_branchtailmerge off
#endif
/* CW 10.1 compilation issue - switch off peephole optimization */
#if (__CWBUILD__ == 3009)
#pragma peephole off
#pragma no_register_coloring on
#endif
PetrU
r51423 wrote:NeraPhil,
In CW 10.1 compiler4.3.3 version there was a bug which requested to turn off branchtailmerge optimization. Its fixed in CW 10.2 so you can remove the following check in mqx.h
#if defined(__CWBUILD__)
/* This section switches off the branchtailmerge optimization which is not
implemented correctly in the CodeWarrior C/C++ Compiler version 4.3.3
(known issue) */
#if (__CWBUILD__ >= 38) && (__CWBUILD__ <= 50)[snip]
I currently have MCU v10.1 and v10.2 installed. I'm starting a new project and will be using 10.2 for that, but I have at least one existing project which to date I've been using v10.1 to compile. Simply removing this check in mqx.h would potentially bork any build I attempt in the older 10.1.
Is there a way in the preprocessor to distinguish whether I'm using CW for MCU 10.2 vs. 10.1? Thanks.
PetrU,
If I understand you right this is a "bug" in the MQX 3.8 source code? Will this be corrected with MQX 3.9 - or will there be a MQX 3.8.x version?
NeraPhil