This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to purify some functions.


grahams wrote:

> Would it not be possible for the compiler to check that
> functions marked as pure are indeed pure.

If the compiler can figure out that something that is marked as pure
is pure, then the compiler should be able to figure out that something
should be marked as pure.  Therefore, if this is indeed possible, the
user shouldn't be marking them as pure and the compiler should be doing
it on its own without the user cluttering the code with such hints.

Personally, I'm not a big fan of telling compilers things they should be
able to figure out.  I didn't like 'register', either. 

RJL

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]