Ticket #287 (Fixed)Fri May 06 21:16:53 UTC 2011
Mixing RISC OS and UNIX style filenames causes undefined instruction in C compiler
Reported by: | Rik Griffin (98) | Severity: | Normal |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Fixed |
Details by Rik Griffin (98):
In a #include statement in C code, using both a RISC OS path and a UNIX style directory separator causes cc 5.69 to data abort.
For example:
#include “Lib:Thing.Foo.h” works OK
#include “Lib:Thing/Foo.h” causes data abort
#include “Thing/Foo.h” works OK
This probably isn’t a sensible thing to try and do, because the reason to use “/” in a #include is for code portability to unix. But it’d be nice to have a warning rather than a data abort.
Changelog:
Modified by Rik Griffin (98) Fri, November 23 2012 - 13:53:18 GMT
- Summary changed from Mixing RISC OS and UNIX style filenames causes data abort in C compiler to Mixing RISC OS and UNIX style filenames causes undefined instruction in C compiler
- Attachment added: compiler-test.zip
Correction: it’s not a data abort, it’s an undefined instruction error.
I’ve attached a minimal test case. Beware that on several occasions running the test has stiffed my machine.
I’m also wondering if this is connected to https://www.riscosopen.org/forum/forums/4/topic…
Modified by Sprow (202) Sun, December 02 2012 - 10:48:07 GMT
- Status changed from Open to Fixed
- Part changed from RISC OS: C/C++ toolchain to RISC OS: Module
The problem did not occur on RISC OS 4.02 with cc 5.69, so the C compiler is not directly implicated.
Fixed in FileSwitch 2.80.