Nested Casts Don't Match 010 Behavior #122
Labels
bug
concrete-issue
An actionable, concrete issue that includes stack trace & technical details. Usually post-triage
This is a tricky one that came up during the work on #120. I decided to make it a separate issue.
Describe the bug
Nested casts do not match gcc behavior - is the "correct" behavior here undefined in the C standard? (still tracking that down). I thought it seemed clear, but I need to verify.
Consider the 010 template code below:
The output of the template above when run in 010 Editor is
000000f0
.Now consider this small C program:
When compiled and run with gcc, the output is
00000ff0
, which is what pfp is currently mirroring.Which is correct? Is it a bug in 010 Editor, or undefined behavior in the C standard?
If it's undefined behavior, we need to mirror 010 Editor. If it's a bug in 010 Editor, we should match the C standard.
To Reproduce
Run the provided template script and C programs and compare their output.
Expected Behavior
010 Editor, pfp, and gcc should have the same output,
00000ff0
.Implementation/Fix Notes/Thoughts
Here's a test that demonstrates the problem:
The text was updated successfully, but these errors were encountered: