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: const weak variables are inlined.


Richard Guenther wrote:
CCP and SCCVN do this optimization as well.  I don't see why volatile const
should disable the optimization.

"const volatile" means the program cannot change the value, but that the value may be changing by itself, as from a read-only hardware register. We definitely should not propagate the value in that case, and there is no conflict with C++; that's not a valid integral constant expression.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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