[fpc-devel] wrong results of function "align"

Burkhard Carstens fpc at bcsoft.de
Sun Jul 2 16:33:46 CEST 2006


.. there are similar problems with other align functions:

function aligntoptr in 
 rtl/inc/dynarr.inc
 rtl/inc/variants.pp

aligntoptr($70000001) -> 70000004 //correct
aligntoptr($80000001) -> 80000008 //wrong

These are only relevant to platforms where 
$FPC_REQUIRES_PROPER_ALIGNMENT



function align in 
 compiler/cutils.pas

align($70000001,4) -> 70000004  //correct
align($80000001,4) -> 7FFFFFFC  //wrong



function aligntoptr in
 rtl/objpas/typinfo.pp
seems to be the only one doing it correctly!!

Regards,
 Burkhard




More information about the fpc-devel mailing list