]> gcc.gnu.org Git - gcc.git/commitdiff
invoke.texi (strict-prototypes): Remove.
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 25 Jul 2000 20:17:28 +0000 (20:17 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 25 Jul 2000 20:17:28 +0000 (20:17 +0000)
* invoke.texi (strict-prototypes): Remove.
* extend.texi (Deprecated Features): Add strict-prototypes.
(Backwards Compatibility): New node.

From-SVN: r35253

gcc/ChangeLog
gcc/extend.texi
gcc/invoke.texi

index 6da8a26e53866799e72a8c470e9bee13832d6b1b..b1e123a714cd0bcd89f20ef6cd2a6f09f707846f 100644 (file)
@@ -1,3 +1,9 @@
+2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * invoke.texi (strict-prototypes): Remove.
+       * extend.texi (Deprecated Features): Add strict-prototypes.
+       (Backwards Compatibility): New node.
+
 2000-07-25  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/i386.md (andsi_1+1): Allow HImode.
index 6eefa62493640fc2444ffa823a6c51f96a649a4b..88efe7c9e461b4ff2d60b96af5d8438e776bece5 100644 (file)
@@ -66,6 +66,7 @@ C++ Language}, for extensions that apply @emph{only} to C++.
 * Return Address::      Getting the return or frame address of a function.
 * Other Builtins::      Other built-in functions.
 * Deprecated Features:: Things might disappear from g++.
+* Backwards Compatibility:: Compatibilities with earlier definitions of C++.
 @end menu
 @end ifset
 @ifclear INTERNALS
@@ -114,6 +115,7 @@ C++ Language}, for extensions that apply @emph{only} to C++.
                         function.
 * Return Address::      Getting the return or frame address of a function.
 * Deprecated Features:: Things might disappear from g++.
+* Backwards Compatibility:: Compatibilities with earlier definitions of C++.
 * Other Builtins::      Other built-in functions.
 @end menu
 @end ifclear
@@ -3292,6 +3294,42 @@ 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.
 
+@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}
+
+@end table
+
+@node Backwards Compatibility
+@section Backwards Compatibility
+@cindex Backwards Compatibility
+@cindex ARM
+
+Now that there is a definitive ISO standard C++, g++ has a specification
+to adhere to. The C++ language evolved over time, and features that used
+to be acceptable in previous drafts of the standard, such as the ARM, are
+no longer accepted. In order to allow compilation of C++ written to such
+drafts, g++ contains some backwards compatibilities. @emph{All such
+backwards compatibility features are liable to disappear in future
+versions of g++.} They should be considered deprecated @xref{Deprecated
+Features}.
+
+@table @code
+@item For scope
+If a variable is declared at for scope, it used to remain in scope until
+the end of the scope which contained the for statement (rather than just
+within the for scope). g++ retains this, but issues a warning, if such a
+variable is accessed outside the for scope.
+
+@item implicit C language
+Old C system header files did not contain an @code{extern "C" @{...@}}
+scope to set the language. On such systems, all header files are
+implicitly scoped inside a C language scope. Also, an empty prototype
+@code{()} will be treated as an unspecified number of arguments, rather
+than no arguments, as C++ demands.
 @end table
 
 @node C++ Extensions
index cb3b6a3eb404e56e13977e6a015dd76741f0d758..382fb7bb7736168f0ee5b242be5bf87c2b27fd15 100644 (file)
@@ -111,7 +111,7 @@ in the following sections.
 -fhuge-objects -fno-implicit-templates -finit-priority
 -fno-implement-inlines -fname-mangling-version-@var{n}
 -fno-default-inline -fno-operator-names -fno-optional-diags -fpermissive
--frepo -fstrict-prototype -fsquangle -ftemplate-depth-@var{n}
+-frepo -fsquangle -ftemplate-depth-@var{n}
 -fuse-cxa-atexit -fvtable-thunks -nostdinc++ -Wctor-dtor-privacy
 -Wno-deprecated -Weffc++ -Wno-non-template-friend -Wnon-virtual-dtor
 -Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wreorder
@@ -1209,19 +1209,6 @@ of the language, you can save some space by using this flag.  Note that
 exception handling uses the same information, but it will generate it as
 needed.
 
-@item -fstrict-prototype
-Within an @samp{extern "C"} linkage specification, treat a function
-declaration with no arguments, such as @samp{int foo ();}, as declaring
-the function to take no arguments.  Normally, such a declaration means
-that the function @code{foo} can take any combination of arguments, as
-in C.  @samp{-pedantic} implies @samp{-fstrict-prototype} unless
-overridden with @samp{-fno-strict-prototype}.
-
-Specifying this option will also suppress implicit declarations of
-functions.
-
-This flag no longer affects declarations with C++ linkage.
-
 @item -fsquangle
 @itemx -fno-squangle
 @samp{-fsquangle} will enable a compressed form of name mangling for
This page took 0.085139 seconds and 5 git commands to generate.