John Martin wrote:
Garrett D'Amore wrote:
I need a reviewer or two for this. It should be pretty obvious. The webrev is here:

   http://cr.opensolaris.org/~gdamore/afe/
I believe the initialization inside the for statement:

       for (int i = 0; i < 5000; i++) {

will fail when building with gcc 3.4.3 without enabling C99 mode.

The Makefiles specify that C99 mode is to be enabled.  Specifically,
this gets compiled with:

+ /usr/sfw/bin/gcc -fident -finline -fno-inline-functions -fno-builtin
-fno-asm -nodefaultlibs -D__sun -O -D_ASM_INLINES -ffreestanding -Wall
-Wno-unknown-pragmas -Wno-missing-braces -Wno-sign-compare
-Wno-parentheses -Wno-uninitialized -Wno-implicit-function-declaration
-Wno-unused -Wno-trigraphs -Wno-char-subscripts -Wno-switch -gdwarf-2
-std=gnu99 -fno-dwarf2-indirect-strings -Werror -D_KERNEL -ffreestanding
-D_SYSCALL32 -D_DDI_STRICT -I../../intel -nostdinc -I../../common -c -o
/tmp/.cwCAAvRa4_A.o ../../common/io/afe/afe.c

(Look carefully to notice -std=gnu99 in the flags above.)

C99 has been blessed for use in the kernel for a while now. :-)

   -- Garrett

_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to