Ticket #207 (WontFix)Sat Jun 27 16:50:24 UTC 2009
Many signed v.s. unsigned and typecasting warnings during ROM compilation.
Reported by: | Jan Rinze (235) | Severity: | Enhancement |
Part: | RISC OS: General | Release: | |
Milestone: | RISC OS ROM build complete | Status | WontFix |
Details by Jan Rinze (235):
These warnings worry me the most:
odd unsigned comparison with 0: ‘<=’ implicit cast (to ‘int’) overflow unsigned constant overflow: ‘<<’ cast of ‘enum’ to differing enumThese happen often when constants are used to setup configuration bits.
The results will be compiler dependent. Also some processors may handle signed/unsigned differently..
This all might sound pedantic but code is very likely to break due to compiler dependencies here.
These warnings tell programmers that they may have been sloppy with typecasting and warn that things may not work as intended. Often resulting in unpredictable behavior and ‘random’ errors..
Best regards,
Jan Rinze.
Changelog:
Modified by Sprow (202) Fri, September 21 2012 - 21:31:14 GMT
- Status changed from Open to WontFix
This is a general problem with all software everywhere – compilers become more and more strict and source code needs to be adjusted/tightened up.
Since the ticket is so vague I can’t see how it can ever be completed, hence I’m closing it. I know (myself included) squashing warnings is a common pastime.