Thread (8 messages) 8 messages, 6 authors, 2016-04-06

variant length array?

From: Bernd Petrovitsch <hidden>
Date: 2016-04-06 10:51:16

Hi!

On Die, 2016-04-05 at 15:29 -0400, Wenda Ni wrote:
[...]
I come across the following code in a kernel module code. It defines an
array whose length is variant at runtime, depending on the actual inputs.
It seems that kernel compiler supports this, which is obvious an error in
the standard ANSI C. Do I have the correct understanding on it?
ANSI-C ist old and enforced with -std=c89 with gcc (see manual page).
VLAs are allowed since (standard) C99.

	Bernd
-- 
"What happens when you read some doc and either it doesn't answer your
question or is demonstrably wrong? In Linux, you say "Linux sucks" and
go read the code. In Windows/Oracle/etc you say "Windows sucks" and
start banging your head against the wall."    - Denis Vlasenko on lkml
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help