Makefile: Globally enable VLA warning
[linux-2.6-block.git] / Makefile
index 19948e55694138bae4cfdc49775bb72486e12eb8..f1760e8db5732484c12d6d439a6ec870575198ed 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -804,6 +804,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 # warn about C99 declaration after statement
 KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 
+# Variable Length Arrays (VLAs) should not be used anywhere in the kernel
+KBUILD_CFLAGS += $(call cc-option,-Wvla)
+
 # disable pointer signed / unsigned warnings in gcc 4.0
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)