Bug 928

Summary: variable length arrays are not standard-compliant
Product: ns-3 Reporter: Quincy Tse <quincy.tse>
Component: examplesAssignee: Flavio Kubota <kubota>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage, ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Proposed patch.

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