creachadair / imath

Arbitrary precision integer and rational arithmetic library
Other
131 stars 20 forks source link

Missing const directives #52

Closed jeffdoggett closed 3 years ago

jeffdoggett commented 3 years ago

I've tried to compile the library for an embedded project where the code runs from flash memory. This reveals some places where the const directive is missing. Two examples are:

1) In imath.c static const char const s_unknown_err = "unknown result code"; static const char const s_error_msg [] =

(Constant pointers to constant strings)

2) In iprime.c static const int s_ptab[] =

creachadair commented 3 years ago

Thanks. I didn't see any other important cases, but let me know if your build doesn't work with #53 and I'll be glad to add others that I may have missed grepping.