VLA detection ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Now that we have -Wvla set:
===
    Adds C++ warning flag for C Variable-Length Arrays.

    C VLAs are not supported in C++. However, the GNU compiler allows
    them as an extension, which it does not warn about when not in
    pedantic mode. Unfortunately, it's easy to accidentally write
    a VLA, even unintentionally-- adding this warning will help us
    catch that.
===

Are there going to be attempts to eradicate this usage?
Note that Clang also supports VLAs:
===
GCC and C99 allow an array's size to be determined at run time. This
extension is not permitted in standard C++. However, Clang supports such
variable length arrays for compatibility with GNU C and C99 programs.
===

--WjW
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux