[Bug libstdc++/54320] New: [c++11] range access to VLA

vincenzo.innocente at cern dot ch gcc-bugzilla@gcc.gnu.org
Sun Aug 19 07:12:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54320

             Bug #: 54320
           Summary: [c++11] range access to VLA
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


is range access to VLA supported?

I get compilation error for

 c++ -O3 -std=gnu++11 -c vla.cpp -DVLA

with

#include<algorithm>
#ifdef VLA
int foo(int N) {
  int v[N];
  auto a = std::begin(v);
  return *a;
}
#endif

int bar() {
  int v[10];
  auto a = std::begin(v);
  return *a;
}



More information about the Gcc-bugs mailing list