[llvmlinux] [PATCH V2 2/3] Remove VLAIS usage from gadget code

Bryce Lelbach blelbach at cct.lsu.edu
Wed Dec 5 23:48:24 UTC 2012

On 2012.12.04 23.24, Sebastian Andrzej Siewior wrote:
> > VLAIS is not something they are willing to accept (for various
> > reasons). There are other patches to LLVM that are still working
> Is this not described in C99

No, this is not the case - flexible array members are a very different beast,
which are in-and-of-themselves of debatable merit. C99 explicitly
states that VLAIS are illegal. The same language is present in C11 (same

	A member of a structure or union may have any object type other than a variably
	modified type.

In C99, the definition of a variably modified type is given:

	.. [snip] ... If the nested sequence of declarators in a full declarator
	contains a variable length array type, the type specified by the full
	declarator is said to be variably modified.

It would require incredible, earth-moving acts for VLAIS to become a part of the
ISO/IEC standard for the C programming language.

P.S. As a general note, while I do agree that it is preferable to rewrite code
using VLAIS instead of utilizing a macro, I would ask that some reconsideration
be given, unless there are Linux kernel developers who are willing and able
to implement the necessary rewrites. The LLVMLinux project does not wish to
decrease the code quality of the Linux kernel, and certainly we do not intend to
cause any GCC breakage.

However, I think that rewrites to all the relevant VLAIS code would be quite
time consuming for the LLVMLinux team, and the proposed macro does not appear
to me to present any particular evil, other than by nature of being a macro.

If faced between the choice of either accepting this VLAIS patch, or not being
able to compile the Linux kernel with standard-compliant, largely GCC-compatible
compilers such as Clang and icc, I would think that accepting the VLAIS patch
would be preferable.

(note also that I have only come in on the end of this thread, and I may have
missed part of the context).

Bryce Adelstein-Lelbach aka wash
STE||AR Group, Center for Computation and Technology, LSU
860-808-7497 - Cell
225-578-6182 - Work (no voicemail)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20121205/5ce54cb4/attachment.sig>

More information about the LLVMLinux mailing list