This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in egcs-1.1
- To: rehwald at uni-muenster dot de
- Subject: Re: Bug in egcs-1.1
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 24 Sep 1998 02:00:48 +-300
- Cc: egcs-bugs at cygnus dot com
- References: <98092315024100.18087@jammer>
Martin Rehwald <rehwald@uni-muenster.de> writes:
> int main(int i) { char* s=new char[i+1](' '); }
> egcserrtst2.cpp: In function `int main(int)':
> egcserrtst2.cpp:3: request for member `__ct' in `*{anon}', which is of non-aggregate type `char'
The error message could certainly be improved, but the code is really
incorrect. new expressions of array types cannot contain non-default
initializers.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil