https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83503
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #12) > AFAIK, specifying attribute const and pure on a function definition has no > effect on the code emitted for the function itself or on its callers in > other translation units, so what you describe doesn't sound meaningful. The attribute on function definition affects all code in that TU. Or, look at e.g. glibc external vs. internal headers, external headers are something that is for users outside of glibc, internal headers include the external ones and can tweak stuff for the internal users. External header could use pure attribute, internal could use const attribute (or just one internal header for a particular sysdep etc.). Many other projects use similar header schemes.