RFA - C++ new initializers
Nathan Sidwell
nathan@codesourcery.com
Mon Jan 22 02:20:00 GMT 2001
Hi,
this relates to bug 1654 which gives an ICE on `incorrect' use of
G++'s new initializer extension.
g++ allows one to say things like
new int = 5;
new int[4] = {1, 2, 3, 4};
However, that's giving an ICE in 1654's case, because it is saying
ContinuedFraction cf = {4, new BigInt = {2, 1, 4, 3}};
I can't see any documentation on this extension in extend.texi. I had
thought that maybe it was restricted to pod types, but testcase
g++.robertl/eb63.C indicates otherwise.
We also allow non-default initialization of array members like
new int[5] (3)
What to do.
a) remove the extensions.
b) deprecate the extensions.
c) keep them for non-pod types (and document them)
d) get them working for pod types too.
My preference is a or b.
comments?
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
More information about the Gcc-bugs
mailing list