Bug 928 - variable length arrays are not standard-compliant
variable length arrays are not standard-compliant
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: examples
ns-3-dev
All All
: P5 normal
Assigned To: Flavio Kubota
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-30 22:13 EDT by Quincy Tse
Modified: 2011-08-10 12:27 EDT (History)
3 users (show)

See Also:


Attachments
Proposed patch. (1.44 KB, patch)
2010-05-30 22:35 EDT, Quincy Tse
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Quincy Tse 2010-05-30 22:13:09 EDT
Lines 115, 144, 145, 146, 147 uses variable length array, which does not conform to standard C++.
Comment 1 Quincy Tse 2010-05-30 22:23:42 EDT
Further info - some compilers (clang, llvm-gcc) are unable to compile variable-length arrays due to their strict standards compliance. I'll submit a patch for consideration once I've run through the test.py.
Comment 2 Quincy Tse 2010-05-30 22:35:34 EDT
Created attachment 900 [details]
Proposed patch.

Moved the variable length array from stack to heap (patch uses new[]). Corresponding delete[] added at the end of code to free memory.
Comment 3 Mathieu Lacage 2011-08-10 12:26:28 EDT
ok for me. I have applied as obvious.

changeset
Comment 4 Mathieu Lacage 2011-08-10 12:27:30 EDT
changeset 231acc30d08f