From: Joe Buck <jbuck@synopsys.com>
To: robert@physiol.med.tu-muenchen.de (Robert Wilhelm)
Cc: Lassi.Tuura@cern.ch, neal@ctd.comsat.com, egcs@cygnus.com,
g++@cygnus.com
Subject: Re: 971127 array initialization problem!?!
Date: Mon, 01 Dec 1997 11:32:00 -0000 [thread overview]
Message-ID: <199712011746.JAA26218@atrus.synopsys.com> (raw)
In-Reply-To: <19971201112846.20776@haegar.physiol.med.tu-muenchen.de>
> On Mon, Dec 01, 1997 at 08:52:19AM +0100, Lassi A. Tuura wrote:
> > neal@ctd.comsat.com wrote:
> > > QBitmap* y = new QBitmap[5](2,2);
> >
> > This is not valid C++ syntax -- initialisers are not allowed in
> > array-new expression. Code like this used to compile with g++, but I
> > don't know if it ever was officially supported GNU extension. If the
> > feature has been removed, the diagnostic could be improved...
> >
>
> Would the g++ maintainers accept patches to restore the old behavior?
>
> I have quite a lot of code which depends on
> this unofficial behavior :-(
I would advise against it. g++ can't carry baggage forever. I'd like
for us to encourage people to write C++ and do a good job compiling it,
rather than encourage them to write a different language called "g++".
As for your "quite a lot of code", use vectors to get the same effect:
vector<QBitmap> y(5, QBitmap(2,2));
If you must have C arrays, you could use placement new to do the
construction.
prev parent reply other threads:[~1997-12-01 11:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-30 7:17 neal
1997-11-30 14:29 ` Alexandre Oliva
1997-11-30 23:52 ` Lassi A. Tuura
1997-12-01 2:46 ` Robert Wilhelm
1997-12-01 11:32 ` Joe Buck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199712011746.JAA26218@atrus.synopsys.com \
--to=jbuck@synopsys.com \
--cc=Lassi.Tuura@cern.ch \
--cc=egcs@cygnus.com \
--cc=g++@cygnus.com \
--cc=neal@ctd.comsat.com \
--cc=robert@physiol.med.tu-muenchen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).