Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752341AbdCEJoh (ORCPT ); Sun, 5 Mar 2017 04:44:37 -0500 Received: from mail-ot0-f180.google.com ([74.125.82.180]:33925 "EHLO mail-ot0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbdCEJof (ORCPT ); Sun, 5 Mar 2017 04:44:35 -0500 MIME-Version: 1.0 From: Tomas Winkler Date: Sun, 5 Mar 2017 11:44:33 +0200 Message-ID: Subject: Arrays of variable length To: "linux-kernel@vger.kernel.org" , sparse@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 443 Lines: 15 Sparse complains for arrays declared with variable length 'warning: Variable length array is used' Prior to c99 this was not allowed but lgcc (c99) doesn't have problem with that https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html. And also Linux kernel compilation with W=1 doesn't complain. Since sparse is used extensively would like to ask what is the correct usage of arrays of variable length within Linux Kernel. Thanks Tomas