This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug tree-optimization/19828] [4.0 Regression] LIM is pulling out a pure function even though there is something which can modify global memory


------- Additional Comments From rakdver at gcc dot gnu dot org  2005-02-18 16:16 -------
OK, I agree that definition of ``pure'' needs to be changed in order to be 
useful (and to match the expectations); obviously, any function that is not 
total does not match the current definition.

What I find somewhat troublesome is that the "upgraded" definition of pure puts 
some of obligation on user of the function, rather than function itself.  The 
definition matching the expected semantics would need to be something like
"Pure function is guaranteed to be always called in such a way that it has no
side effects."

-- 


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


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