Visual C++ 2008 Optimization + PopupMenu



Visual C++ 2008, x86, juce from GIT, amalgamated juce used.

If I compile my program with full optimization enabled - i’ll get strange thing with PopupMenus. It is have no any text and too small.
Thanks, Michail.


Very odd! Can you reproduce the same thing with the juce demo?


Looks like errors appears with:
Streaming SIMD Extensions 2 (/arch:SSE2)
Floating Point Model : Fast (/fp:fast)
Optimization : 02 or Ox.

I can send you project file, if you want.


Ah yes, I know about that. Must be some sort of compiler bug.

I found that it works with SSE2, or fast floating point, but not both at the same time!

Unfortunately it’s almost impossible to figure out exactly which bit of code might be getting compiled wrongly.


OK, thanks.
I think it is good idea to document it some where.

Thanks, Michail.


I stumbled across the same problem just few days ago. I think (but am not sure) that the problem may be in some of the routines that round the float values to int. Could it be?


Possibly. I suppose you could try replacing the roundToInt function and see if it makes a difference. It must be a very subtle bug though, I don’t fancy trying to figure it out!