An unsigned short value is promoted to int, thus triggering UB on a
left shift of a positive value that results in a negative int.
PR 26415
* vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
+2020-08-26 Alan Modra <amodra@gmail.com>
+
+ PR 26415
+ * vms-misc.c (vms_time_t_to_vms_time): Don't use unsigned short vars.
+
2020-08-26 David Faust <david.faust@oracle.com>
* archures.c (bfd_mach_xbpf): Define.
void
vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *lo)
{
- unsigned short val[4];
- unsigned short tmp[4];
+ unsigned int val[4];
+ unsigned int tmp[4];
unsigned int carry;
int i;