aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-03-21 11:04:36 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-03-21 11:04:36 +0000
commitf82ece6b59622033b3dabf124d999d6f2fb1b6d7 (patch)
tree040f797e6109bd8be5c3cf2481cdbf62aced7f9b /gcc/doc
parent7cd9cf2f0bc24499c292896f951c2a34875637f0 (diff)
downloadgcc-f82ece6b59622033b3dabf124d999d6f2fb1b6d7.zip
gcc-f82ece6b59622033b3dabf124d999d6f2fb1b6d7.tar.gz
gcc-f82ece6b59622033b3dabf124d999d6f2fb1b6d7.tar.bz2
Deprecate some C++ extensions
https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00995.html * doc/extend.texi (Deprecated Features): Update deprecared flags, mention anon-struct/union members and trailing attributes. cp/ * class.c (finish_struct_anon_r): Refactor, deprecate anything other than public non-static data members. * parser.c (cp_parser_init_declarator): Deprecate attributes after parenthesized initializer. testsuite/ * g++.dg/ext/anon-struct6.C: Adjust. * g++.dg/ext/deprecate-1.C: New. * g++.dg/ext/deprecate-2.C: New. * g++.dg/lookup/pr84602.C: Adjust. * g++.dg/lookup/pr84962.C: Adjust. * g++.old-deja/g++.other/anon4.C From-SVN: r258712
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi26
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index c0e7792..ce7862d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -23824,23 +23824,25 @@ some cases that the feature will be dropped in the future. In other
cases, the feature might be gone already.
While the list below is not exhaustive, it documents some of the options
-that are now deprecated:
+that are now deprecated or have been removed:
@table @code
@item -fexternal-templates
@itemx -falt-external-templates
-These are two of the many ways for G++ to implement template
-instantiation. @xref{Template Instantiation}. The C++ standard clearly
-defines how template definitions have to be organized across
-implementation units. G++ has an implicit instantiation mechanism that
-should work just fine for standard-conforming code.
+These are two options provided alternative methods of template
+instantiation. @xref{Template Instantiation}. The options have been removed.
@item -fstrict-prototype
@itemx -fno-strict-prototype
Previously it was possible to use an empty prototype parameter list to
indicate an unspecified number of parameters (like C), rather than no
-parameters, as C++ demands. This feature has been removed, except where
-it is required for backwards compatibility. @xref{Backwards Compatibility}.
+parameters, as C++ demands. This feature has been removed.
+
+@item -fno-for-scope
+@item -ffriend-injection
+These two options provide compatibility with pre-standard C++.
+@xref{Backwards Compatibility}.
+
@end table
G++ allows a virtual function returning @samp{void *} to be overridden
@@ -23879,6 +23881,14 @@ initializers for static members of const integral types and const
enumeration types so this extension has been deprecated and will be removed
from a future version.
+G++ allows attributes to follow a parenthesized direct initializer,
+e.g.@: @samp{ int f (0) __attribute__ ((something)); } This extension
+has been ignored since G++ 3.3 and is deprecated.
+
+G++ allows anonymous structs and unions to have members that are not
+public non-static data members (i.e.@: fields). These extensions are
+deprecated.
+
@node Backwards Compatibility
@section Backwards Compatibility
@cindex Backwards Compatibility