Re: -mm merge plans for 2.6.21

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 9 2007 14:04, Andi Kleen wrote:
>Andrew Morton <[email protected]> writes:
>> 
>> As long as nobody takes the address of them (which wouldn't compile today
>> anyway) then the compiler should be able to not allocate store for these. 
>
>This would only work for unit-at-a-time compilers (if it works at all,
>i'm not sure), but not older 3.x compilers
>
>> That they're const might help too.
>
>Don't think it does.

GCC 4.1 optimizes both Andrew's and Frederik Deweerdt's ideas 
perfectly out. Even if the const was not there in Frederik's example, 
gcc seems throw it out with -O2 (judging by `nm` output) since it is
1. static 2. unused. Gcc even gives out a warning that the item is 
unused when not marked with const.


Jan
-- 
ft: http://freshmeat.net/p/chaostables/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux