www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/02/13:45:20

Sender: nate AT cartsys DOT com
Message-ID: <37050A0F.65333935@cartsys.com>
Date: Fri, 02 Apr 1999 10:18:55 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: problem with new[] using djgpp egcs
References: <7e1h02$7nu$1 AT cantuc DOT canterbury DOT ac DOT nz>
Reply-To: djgpp AT delorie DOT com

Andrew Reid wrote:
> 
> I'm having a problem with the standard new[] operator
> 
> The following code (a simple example) compiles and works fine with the
> djgpp(2.02) port of gcc 2.81, and with egcs under Redhat Linux 5.2, but
> causes an error when I try to use egcs 1.1.2 for djgpp or pgcc for linux
> 
> int main( void ) {
>  int* x = new int[5](0);
> }
> 
> The error message I get is:
> request for member `__ct' in `*{anon}', which is of non-aggregate type `int'
> and obviously the compiler is going to get stuck if it's trying to find
> members of a built in type

I don't know enough about C++ to understand this, but this looks like a
language issue rather than a DJGPP issue.  I'd suggest posting to
comp.lang.c++, or possibly an egcs list.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019