I am used to using -std=c99
to enable c99 features when compiling application code.
Recently I have been following some basic kernel module examples, and added ccflags-y := -std=c99
to the makefile. However this resulted in 17K lines of errors when I tried to make. gnu99
works perfectly.
What is the difference between gnu99 and c99 that kernel code relies on?
What is the difference between gnu99 and c99 that kernel code relies on?
. I think you can find these differences yourself. This is from gcc doc:GNU C provides several language features not found in ISO standard C. (The -pedantic option directs GCC to print a warning message if any of these features is used.)
. So, build the kernel withgnu99
but addccflags-y := -pedantic
. And then analyze warnings. This is from gcc's doc: gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/… – Test