On 21 September 2015 at 13:31, Gavin Wraith <ga...@wra1th.plus.com> wrote:
> I have some code that uses OS_GPBP 12 to iterate > over objects in a directory, returning for each one > its name and filetype. It has been working for years > in RiscLua, when compiled with Norcroft and Objasm. > Now that I am using GCC the filetype is always > returned as zero, and I cannot see why. > > OS_GPBP 12 uses a buffer to return its results, > with the object's name as a zero-terminated > string at buf+24, and the filetype in the word > at buf+20. I declare a buffer with > > static const int rdir_buf[RDIR_BUFLEN/sizeof(int)]; > ^ shouldn't that be static int? Wouldn't the const imply that the buffer never changes and could be liable to some optimisation in the way members are accessed? Nick
_______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK