daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Aug 12th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.
RAW Paste Data
Top