On 06/01/2012 05:37 PM, Jason Merrill wrote:
On 06/01/2012 08:09 AM, Florian Weimer wrote:
The only remaining glitch is in g++.dg/cpp0x/regress/debug-debug7.C,
specifically (b is not a constant):
int (*x)[b] = new int[a][b]; // { dg-error "not usable" }
The new warning I've added fires on this line, too. How can I check for
the pending error and suppress the warning?
Warning only if the array is a typedef might do the trick.
I'm afraid not. We really want to warn for
new (char[n])
as well.
I'm puzzled why build_new is even invoked after detecting that there is
a non-constant expression.
--
Florian Weimer / Red Hat Product Security Team