Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. struct Blah {
  2. static const int len = 5;
  3. };
  4. void Foo() {
  5. Blah b;
  6. char x[Blah::len];
  7. char y[b.len];
  8. }
  9.  
  10. % clang -Wvla -fsyntax-only test.cc
  11. test.cc:7:9: warning: variable length arrays are a C99 feature, accepted as an
  12. extension [-Wvla]
  13. char y[b.len];
  14. ^
  15. 1 warning generated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement