[LLVMbugs] [Bug 20630] clang incorrectly infers that a fixed length array is a VLA when passing a const size through a function.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 11 18:59:02 PDT 2014


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
No, that's a VLA. When determining whether you have a VLA, this is the code the
compiler looks at:

  void func(const int n)                                                        
      std::vector<int> futs[n];                                                 

The way in which you call this function is not relevant; 'n' is not constant

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140812/02f0d624/attachment.html>

More information about the llvm-bugs mailing list