[Bug c++/33124] New: C++ frontend should not warn about new a[0] in template context

2007-08-20 Thread ian at airs dot com
For this simplified code: templateint c char* f1() { if (c == 0) return 0; else return new char[c]; } char* f2() { return f10(); } the C++ frontend issues an unconditional warning. When compiling with no options, I get foo.cc: In function ‘char* f1() [with int c = 0]’: foo.cc:3: instantiated

Re: [Bug c++/33124] New: C++ frontend should not warn about new a[0] in template context

2007-08-20 Thread Gabriel Dos Reis
ian at airs dot com [EMAIL PROTECTED] writes: | For this simplified code: | | templateint c | char* f1() { if (c == 0) return 0; else return new char[c]; } | char* f2() { return f10(); } | | the C++ frontend issues an unconditional warning. When compiling with no | options, I get | | foo.cc: