Bugzilla – Bug 1050
ISO C++ forbids variable length array
Last modified: 2011-08-10 13:10:13 EDT
We have several instances where we use array declarations similar to int i = 5 ; int array[i]; rather than int array[5]; This raises portability concerns. It was discovered while I ported the basic simulator to native Windows. (Visual C++ with Windows API support treats them as errors). Using "-ansi -pedantic" flags in "wscript" during compilation we see warnings such as ../src/internet-stack/icmpv6-header.cc:1011: warning: ISO C++ forbids variable length array ‘data’
Created attachment 1074 [details] Patch againist wimax modules
Created attachment 1075 [details] Patch against tap-bridge
Comment on attachment 1074 [details] Patch againist wimax modules (sorry - wrong bug)
Created attachment 1076 [details] Patch against applications module
Created attachment 1077 [details] Patch againist dsdv modules
Created attachment 1078 [details] Patch againist emu modules
Created attachment 1079 [details] Patch againist internet modules
Created attachment 1080 [details] Patch againist network modules
(In reply to comment #5) > Created attachment 1077 [details] > Patch againist dsdv modules patch does not look like it has much to do with variable length arrays. makes tests fail.
(In reply to comment #2) > Created attachment 1075 [details] > Patch against tap-bridge patch buggy: controllen is initialized to incorrect value. i.e., sizeof() gives different values. same for emu patch below.
partially applied: changeset: 91df05070541 It's fascinating to see this patch make some wholly unrelated olsr/dsdv tests fail.