diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-28 09:57:02 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-05-28 09:57:02 +0000 |
commit | f3f6907a0851073d806fb48f634147df37d88eb4 (patch) | |
tree | 2fd377106d55cdc98c53c1839d68e6579ae528b5 /bfd | |
parent | 0c55441a26df0998c91da8795a4d43de07691f52 (diff) | |
download | binutils-redhat-f3f6907a0851073d806fb48f634147df37d88eb4.tar.gz |
bfd/
Workaround GCC PR middle-end/4210.
* vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
and val[3].
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/vms-misc.c | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 05a1656324..6334da07bd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com> + + Workaround GCC PR middle-end/4210. + * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2] + and val[3]. + 2010-05-27 Tristan Gingold <gingold@adacore.com> * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces. diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c index c7bd346837..49b8274e77 100644 --- a/bfd/vms-misc.c +++ b/bfd/vms-misc.c @@ -585,16 +585,8 @@ vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *lo) /* Put into val. */ val[0] = ut & 0xffff; val[1] = (ut >> 16) & 0xffff; - if (sizeof (ut) > 4) - { - val[2] = (ut >> 32) & 0xffff; - val[3] = (ut >> 48) & 0xffff; - } - else - { - val[2] = 0; - val[3] = 0; - } + val[2] = sizeof (ut) > 4 ? (ut >> 32) & 0xffff : 0; + val[3] = sizeof (ut) > 4 ? (ut >> 48) & 0xffff : 0; /* Add offset. */ tmp[0] = VMS_TIME_OFFSET & 0xffff; |