SUNDAY, SEPTEMBER 20, 2026
algol68
algol68: Fix overflow detection in long bits denotations
Corrects overflow detection for bits and long bits denotations in the algol68 front-end.
This commit addresses an issue in the algol68 front-end where strtoul could incorrectly report an overflow. It refines the overflow detection for bits and long bits denotations and adds a test case to verify the fix.
In Details
The a68_lower_denotation function in a68-low-units.cc now correctly handles strtoul's errno return value to detect overflows when parsing bits and long bits denotations. Previously, strtoul could signal overflow via errno without endptr indicating it, leading to incorrect interpretations.