FYI: Optimization level may affect your declares

Apparently changing the optimisation level of your build can affect declares on MacOS. I changed from default to moderate and was confused as to why code I hadn’t looked at for years (with heavy use of declares) was returning empty values. I’m guessing it affects older declares made in the 32 bit era.

That sounds like a bug. What was the declare?

any example to take a look with a disassembler?

I didn’t write the code in question and it involves lots of declares to read Apple Calendar events using Apple’s previous preferred method. I don’t have the time or skill at the moment to parse out the exact offending portion.

Interestingly, when I was stepping through code looking for the offending lines, the debugger was randomly stepping out of events which didn’t affect the result but made stepping through it highly difficult.

That’s just the 64-bit debugger. It’s in really bad shape, but at least kind of works. It also likes to skip soft break points, fair warning.

I would be curious if you are also seeing this with Aggressive. We have one other report of behavior change with Moderate, but it’s not enough to narrow it down.

Alas, aggressive seems to break more of it. No reported problems in the IDE. Just fails to find any calendars at all.

32 bit aggressive works OK. I suspect it’s likely a problem of the code not being fully made safe for 64 bit.

@Greg O’Lone I do have a smaller test project that demonstrates the issue if you wish.

[quote=491549:@Stephen Dodd]aggressive seems to break more of it. No reported problems in the IDE. Just fails to find any calendars at all.

32 bit aggressive works OK. I suspect it’s likely a problem of the code not being fully made safe for 64 bit.

@Greg O’Lone I do have a smaller test project that demonstrates the issue if you wish. [/quote]

Be forehanded and post a Feedback case with all the info and the zipped case demo project. Post the case number here after and we will follow it.