(
Jump to the original submission)
Thu 01 Dec 2011 07:33:55 AM UTC, comment #6:
Cool, thanks.
|
Wed 30 Nov 2011 04:13:46 PM UTC, comment #5:
Fixed as of #2691547. I used boost::scoped_array() instead of a regular C style array.
|
Wed 30 Nov 2011 10:08:03 AM UTC, comment #4:
The VLA warning is also from -pedantic, which is certainly another reason to enable it.
|
Wed 30 Nov 2011 09:29:38 AM UTC, comment #3:
VLAs have never been allowed in C++, either in the last standard or the new one. As Sandro says they are from C99.
The extra ';' is a warning from -pedantic, which I'd recommend enabling so that little bugs like that can be fixed too.
|
Wed 30 Nov 2011 06:33:56 AM UTC, comment #2:
It looks like ISO C99 would allow them but C90 shouldn't
(altought GCC, as an extension, allows that):
http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
More info here:
http://stackoverflow.com/questions/5730101/when-are-variable-length-arrays-legal
I think it'd be worth (and easy) to avoid them.
Having warning-clean builds helps finding important ones.
|
Tue 29 Nov 2011 11:58:00 PM UTC, comment #1:
Which compiler on which distro ? I don't see these warnings with GCC 4.6.2 on Fedora 16. It's perfectly legit code, I wouldn't call this a coding error at all. Sounds more like a compiler bug.
|
Sun 27 Nov 2011 11:56:50 AM UTC, original submission:
Compiler emits following warnings, which should be fixed:
/home/benjamin/Downloads/gnash/broken/librender/openvg/OpenVGBitmap.cpp: In member function 'gnash::renderer::openvg::OpenVGBitmap* gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap(float, float, float, float, float, const gnash::SWFCxForm&, const GradientRecords&, VGPaint)':
/home/benjamin/Downloads/gnash/broken/librender/openvg/OpenVGBitmap.cpp:173:26: warning: ISO C++ forbids variable length array 'ramps' [-Wvla]
/home/benjamin/Downloads/gnash/broken/librender/openvg/OpenVGBitmap.cpp: In member function 'gnash::renderer::openvg::OpenVGBitmap* gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap(float, float, float, float, const gnash::SWFCxForm&, const GradientRecords&, VGPaint)':
/home/benjamin/Downloads/gnash/broken/librender/openvg/OpenVGBitmap.cpp:237:26: warning: ISO C++ forbids variable length array 'ramps' [-Wvla]
/home/benjamin/Downloads/gnash/broken/librender/openvg/OpenVGRenderer.cpp:378:2: warning: extra ';' [-pedantic]
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 4 latest changes.