This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BUG with an array of class objects


Philippe Lavoie <lavoie@zeus.genie.uottawa.ca> writes:

>   a = new point[4]() ; 
>   a = new point[4](0) ; 
>   a = new point[4]((float*)0,0) ; 

Note that this is not ANSI/ISO C++: initializing array types with
non-default constructors in new expressions is provided as an
extension of g++/egcs, that is warned if compiled with `-pedantic'.
Anyway, this problem seems to be fixed in the latest snapshot.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]