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]
Other format: [Raw text]

Re: [RFC]: patch to detect invalid and missing ATTRIBUTE const/pure



jakub@redhat.com said:
> Only if foo is static or MODULE_LOCAL_P. Otherwise anyone can
> interpose a different version of foo which is not pure. 

A dirty stupid idea from a guy doing too much C++...

Why not mangle the names of pure/const functions, so that they can only be 
overriden by other pure/const functions. At least there would be (clear!)
linker messages and the optimization made possible by the attributes 
would always apply (disregarding static, ...).

	Theo.

--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



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