BCB32 ver.6 bug [closed]

11 hours ago 1
ARTICLE AD BOX

Could someone please verify this bug in BCC32.EXE 6.16.0.33 (CodeGear™ RAD Studio 2009 Version 12.0.3170.16989):

typedef struct{ __int64 i; } S; void foo(){ S s={0I64}, *p=&s; p->i <<= 2; //AV /*workaround: p->i = p->i<<2; or p->i = Int64ShllMod32(p->i, 2); */ }

genpfault's user avatar

genpfault

52.3k12 gold badges94 silver badges154 bronze badges

Boba's user avatar

8

Where is your declaration of p?

2026-04-17 22:58:57 +00:00

Commented 9 hours ago

@SergeyAKryukov Right at the end of this: S s={0I64}, *p=&s; Thus giving a pretty good reason why you shouldn't write dense code like this. Some people trying to help can't read your code well enough to help.

2026-04-17 23:42:36 +00:00

Commented 8 hours ago

Recommendation: Edit the question to describe what happens instead of what should happen. Comparison of generated assembly and expected assembly is highly recommended.

2026-04-17 23:45:11 +00:00

Commented 8 hours ago

Do you see the same problem with p->i *= 4;? Bit easier on the brain, maybe easier on the compiler.

2026-04-18 00:02:03 +00:00

Commented 7 hours ago

What is "//AV"?

2026-04-18 03:40:04 +00:00

Commented 4 hours ago

Read Entire Article