.: * extend.texi (Deprecated): Deprecate new initializer lists.
cp:
* errfn.c (cp_deprecated): Tweak diagnostic text.
* parse.y (new_initializer): Deprecate initializer lists
extension.
testsuite:
* g++.old-deja/g++.robertl/eb63.C: Remove new initializer list
case.
* g++.old-deja/g++.ext/arrnew.C: Deprecate.
From-SVN: r39603
+2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * extend.texi (Deprecated): Deprecate new initializer lists.
+
2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
* mkdeps.c (deps_add_default_target): Robustify. Add
+2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * errfn.c (cp_deprecated): Tweak diagnostic text.
+ * parse.y (new_initializer): Deprecate initializer lists
+ extension.
+
2001-02-12 Mark Mitchell <mark@codesourcery.com>
Remove old ABI support.
extern int warn_deprecated;
if (!warn_deprecated)
return;
- cp_warning ("%s is deprecated.", msg);
- cp_warning ("Please see the documentation for details.");
+ cp_warning ("%s is deprecated, please see the documentation for details", msg);
}
void
}
/* GNU extension so people can use initializer lists. Note that
this alters the meaning of `new int = 1', which was previously
- syntactically valid but semantically invalid. */
+ syntactically valid but semantically invalid.
+ This feature is now deprecated and will be removed in a future
+ release. */
| '=' init
{
if (pedantic)
pedwarn ("ISO C++ forbids initialization of new expression with `='");
+ cp_deprecated ("new initializer lists extension");
if (TREE_CODE ($2) != TREE_LIST
&& TREE_CODE ($2) != CONSTRUCTOR)
$$ = build_tree_list (NULL_TREE, $2);
The named return value extension has been deprecated, and will be
removed from g++ at some point.
+The use of initializer lists with new expressions has been deprecated,
+and will be removed from g++ at some point.
+
@node Backwards Compatibility
@section Backwards Compatibility
@cindex Backwards Compatibility
+2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.robertl/eb63.C: Remove new initializer list
+ case.
+ * g++.old-deja/g++.ext/arrnew.C: Deprecate.
+
2001-02-12 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20010209-1.c: New test.
// Build don't link:
// Special g++ Options:
- int *f(){ return new int[1] = { 1 }; }
+int *f(){
+ return new int[1] = { 1 }; // WARNING - deprecated
+}
main() {
A* a;
- a = new A[2] = { A(1,false), A(1,false) } ;
+
a = new A[2](1,false);
}