------- Comment #5 from gnu at behdad dot org  2007-08-13 05:40 -------
(In reply to comment #2)

> If the compiler could tell whether you were right or not in all cases, you
> wouldn't need the attributes in the first place.

This is not completely true though: the compiler cannot tell by just seeing the
prototype.  So, even if the compiler could recognize all pure and const
functions when compiling them, that doesn't help when you need to mark the
prototypes of those functions as pure/const to help the compiler compiling
other programs using them.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487

Reply via email to