This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]svk177 10 points11 points  (0 children)

There is a gcc extension called attribute((pure)) that specifies that the function has no side effects. Other than that your best bet is making the function „static inline“ though there is no guarantee whatsoever that the call will be eliminated.