News for hackers. Stuff that matters.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by daniel-thompson on Sunday August 15, 2021 @09:52AM (#28188745)
The bug has been in the wild for 8 years, so there are almost certainly customers who have VBA scripts that rely on that behavior. Microsoft puts a lot of emphasis on backward compatibility (or at least they used to), so I think there will be some internal debate on whether fixing the bug is more or less disruptive than just leaving it in.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by adrianmonk on Sunday August 15, 2021 @11:49AM (#28189716)
Fix or don't fix aren't the only two options. The third option is to provide a fix that can be enabled or disabled by compiler users as needed.

For maximum backward compatibility, the fix could be disabled by default. But enabling by default still provides a path to backward compatibility with a small amount of manual work for those who need it.

For those who don't want the broken behavior, it might be a hassle to have to enable the fix, but that's still much better than not having a fix and having to write crazy code as a workaround.

I don't know VBA, but as a guess, the #Const directive (https://docs.microsoft.com/en-us/office/vba/language/referen...) for compile-time constants looks like it could be a reasonable way to implement a switchable compiler fix.

Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by pjmlp on Sunday August 15, 2021 @11:52PM (#28194781)
That only leads to exponential code complexity as special purpose solutions get introduced.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by resoluteteeth on Sunday August 15, 2021 @04:34PM (#28192282)
> The bug has been in the wild for 8 years, so there are almost certainly customers who have VBA scripts that rely on that behavior

Most people weren't using 64 bit office until it became the default in 2019. Companies using any sort of legacy add-ins may still be using 32 bit office in 2021.

It's very unlikely that there's much VBA code relying on this specific broken behavior in 64 bit versions.

Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by petters on Sunday August 15, 2021 @01:39PM (#28190623)
It does not show up in 32-bit mode. It does not show up on Macs. Therefore, it should probably be fixed.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by actually_a_dog on Sunday August 15, 2021 @09:59AM (#28188783)
There's a reason "bug for bug compatibility" is a thing, but this isn't it. I highly doubt anyone is relying on this, because it's completely stupid behavior.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by my123 on Sunday August 15, 2021 @10:23AM (#28188970)
Relying on completely insane behavior is a thing that surprisingly, lots of programs do...
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by magpi3 on Sunday August 15, 2021 @10:42AM (#28189129)
https://xkcd.com/1172/

That noted, a broken IF statement does seem like a very serious compiler bug. And especially since the correct behavior occurs on Macs, I think a fix is necessary. The language should be consistent across all platforms at the very least.

Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by yegle on Sunday August 15, 2021 @01:06PM (#28190374)
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by daniel-thompson on Sunday August 15, 2021 @10:41AM (#28189116)
> I highly doubt anyone is relying on this, because it's completely stupid behavior.

1. The person who posted the SO question said they rely on it. There are probably more who haven't discovered they're affected by this or who haven't spoken up yet.

2. An average VBA developer might be more likely to do something like this than you would be.

Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by actually_a_dog on Sunday August 15, 2021 @11:21AM (#28189469)
I just re-read the whole page, and, no, the SO poster is not relying on it. And, if anyone is relying on a bug that makes an if condition go the wrong way, that's so monumentally stupid, they deserve to have their stuff break.
Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by daniel-thompson on Sunday August 15, 2021 @11:52AM (#28189737)
From the original question:

> and also it blocks a migration to Office 64 here, because we can not get our code out

Re:How can I get this 8 year old VBA 64-bit compiler bug fixed? by malf on Sunday August 15, 2021 @12:05PM (#28189857)
Wrong direction.