While preparing for worlds this year, we encountered a rather annoying problem with what appears to be a 256 function limit in RobotC. While this in itself is an understandable limitation, (though I would love another byte to be dedicated to function references as that would hopefully prevent this from ever recurring) after some time spent scratching our heads and counting functions, we determined that we had nowhere near 256 functions, only about half of that. Using the compiler statistics feature in RobotC, we found that all of our functions were counting twice towards this limit. After some more experimentation, we realized that all function declarations were counting towards this limit along with the definitions. I suspect this is a bug and somewhere a counter is being accidentally incremented or a line in a table not being overwritten as I don’t see why the declaration and definition should be any different at the VM level. As we like to declare all our functions in header files as it makes for a nice reference and cleaner code, any more insight into this problem would be wonderful.
Thanks for your time,
Andrew