You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This improves the support for pointer difference calculations and
refactors the parser by extracting complex pointer arithmetic logic into
well-named helper functions.
Limitation:
Integer pointer differences (e.g., 'int *q - int *p') are not fully
supported due to type information loss in the compilation pipeline.
When pointer variables are loaded for use in expressions, they become
temporaries without sufficient type information to determine element
size for proper scaling.
Workaround:
For integer pointer differences, cast to char* and divide manually:
((char *) q - (char *) p) / sizeof(int)
Character pointer differences work correctly because element size is 1,
requiring no scaling.
0 commit comments