Thread (10 messages) 10 messages, 7 authors, 2007-09-11

Re: [PATCH] drivers/firmware: const-ify DMI API and internals

From: Satyam Sharma <hidden>
Date: 2007-09-01 21:09:33
Also in: lkml


On Sat, 1 Sep 2007, Andi Kleen wrote:
quoted
    And if we're really lucky, this might enable some additional
    optimizations on the part of the compiler.
Only if the kernel was compiled C++. C compilers generally ignore constness
for optimization purposes because it can be so easily casted away.
???

I can't speak for the exact const-ification that Jeff did in this
particular patch, but if you intended your comment up there to be a
blanket statement, then you're totally and horribly wrong. There's a
whole plethora of optimizations that gcc does when dealing with const-
marked data. If you've seen / experienced otherwise, please post some
testcases.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help