Qeustion about the optimize option

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

 



I want to build the linux kernel at O0 optimize level. The first problem
that I face was something about constant.
I have study it for a day time, but it haven't sovled.
There is the problem.

#include <stdio.h>

int main()
{
        int *map;
        const size_t size = 128 * sizeof(map[0]);

        ((void)(sizeof(struct { int:-!!(size > ((1UL) << 12)); })));
}

When I compile this program use gcc test.c, it fail with
test.c: In function âmainâ:
test.c:8:24: error: bit-field â<anonymous>â width not an integer
constant

When I compile this program use gcc test.c -O, it success.

Because I want to debug the linux kernel, how can compile the test
program above don't use O1 O2 O3.

Thanks.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux