5 ms·
> C does not annotate pure functions as such, but the > semantics of SDL make some data conversions > referentially transparent FWIW, GCC supports such
by LukeShu 12y ago
> C does not annotate pure functions as such, but the
> semantics of SDL make some data conversions
> referentially transparent
FWIW, GCC supports such annotations with `__attribute__ ((pure))`.
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- cordite 12y agoBut is that data that ends up in the lib*.so's? I can see that possibly optimizing within GCC (or LLVM if it supports it) but I have no clue for library shared/static objects.
- LukeShu 12y agoThe annotation would go in the header files, so that it works with lib*.so's. For example, glibc's strlen is marked this way (as well as a whole host of other functions).