[File] Problem with LESHORT casting

Greg Wildman lists at itns.co.za
Wed Jun 1 08:18:10 UTC 2022


On Tue, 2022-05-31 at 11:12 -0400, Christos Zoulas wrote:
> On 2022-05-31 9:25 am, Greg Wildman wrote:
> > Hello,
> > 
> > After upgrading from 5.39 to 5.40 I noticed a problem with the
> > printing of unsigned shorts. I can "fix" the problem by using
> > uleshort instead of leshort.

<snip>


> Yes, 5.39 was incorrect. Now file has been changed to behave like 
> regular c code does:
> 
> #include <stdio.h>
> 
> int
> main(void)
> {
>          short s = 65535;
>          printf("%u\n", s);
>          return 0;
> }


Roget that. I will file that under "C is broken".

What is the best way to solve this problem using magic pattern ? Is
changing `leshort` to 'uleshort` the best option ?


-- 
Greg


More information about the File mailing list