Target: x86_64-suse-linux Configured with: ../gcc-4.0.0/configure --prefix=/ita3 --enable-languages=c,c++ --with-system- zlib --enable-__cxa_atexit x86_64-suse-linux : (reconfigured) ../gcc-4.0.0/configure --prefix=/ita3 --enable-languages=c,c++ --with-system-zlib --enable-__cxa_atexit --disable-checking x86_64- suse-linux Thread model: posix gcc version 4.0.0 template functions appear to erase the effect of the __extension__ keyword inside their definitions, causing "-ansi -pedantic" to produce an error instead of a warning. Compiling the following code with "-ansi -pedantic" produces an error for the line in the template function, but not the ordinary function. % g++ -c -ansi -pedantic foo.cpp foo.cpp: In function âint template_function(int) [with T = void]â: foo.cpp:15: instantiated from here foo.cpp:11: error: ISO C++ forbids variable-size array ------------------------------------------------------ int ordinary_function(int dimension) { __extension__ int data[dimension]; return 0; } template<typename T> int template_function(int dimension) { __extension__ int data[dimension]; return 0; } template int template_function<void>(int);
Confirmed, not a regression.
I'm not sure, but naively appears fixable similarly to the attributes... Jason?
I don't think implementing this can leverage the attribute work. I'd probably implement it with a new tree code; the alternative would be a new flag in a lot of places.
I see, thanks. Well, if I can bother you a bit more about your very welcome work on attribute aligned, I noticed also PR10179. Thanks again.
*** Bug 45492 has been marked as a duplicate of this bug. ***
Having a look.
Not seriously, for the time being. Unassigning.