Comment 2 for bug 1991765

Revision history for this message
Andrew Johnson (anj) wrote :

The original change (released 7½ years ago) was to properly support 32-bit raw values as you requested in https://epics.anl.gov/tech-talk/2013/msg00684.php but without triggering UB, which modern compiler optimizers love to rely on to break previously-working-but-non-portable code.

ROFF can't hold negative values, it was designed to support ADCs and DACs with an offset zero. If you have device support that was setting a negative ROFF it was depending on overflowing a uint32 calculation, which gcc allows with the -fwrapv flag but EPICS doesn't set that and it isn't portable.

I don't think we can change this in the record types at all, the device support has to provide any fixes necessary IMHO.