Commit 7b300d13 by Nathan Sidwell Committed by Nathan Sidwell

invoke.texi (strict-prototypes): Remove.

	* invoke.texi (strict-prototypes): Remove.
	* extend.texi (Deprecated Features): Add strict-prototypes.
	(Backwards Compatibility): New node.

From-SVN: r35253
parent 2c05a794
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> 2000-07-25 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (andsi_1+1): Allow HImode. * config/i386/i386.md (andsi_1+1): Allow HImode.
......
...@@ -66,6 +66,7 @@ C++ Language}, for extensions that apply @emph{only} to C++. ...@@ -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. * Return Address:: Getting the return or frame address of a function.
* Other Builtins:: Other built-in functions. * Other Builtins:: Other built-in functions.
* Deprecated Features:: Things might disappear from g++. * Deprecated Features:: Things might disappear from g++.
* Backwards Compatibility:: Compatibilities with earlier definitions of C++.
@end menu @end menu
@end ifset @end ifset
@ifclear INTERNALS @ifclear INTERNALS
...@@ -114,6 +115,7 @@ C++ Language}, for extensions that apply @emph{only} to C++. ...@@ -114,6 +115,7 @@ C++ Language}, for extensions that apply @emph{only} to C++.
function. function.
* Return Address:: Getting the return or frame address of a function. * Return Address:: Getting the return or frame address of a function.
* Deprecated Features:: Things might disappear from g++. * Deprecated Features:: Things might disappear from g++.
* Backwards Compatibility:: Compatibilities with earlier definitions of C++.
* Other Builtins:: Other built-in functions. * Other Builtins:: Other built-in functions.
@end menu @end menu
@end ifclear @end ifclear
...@@ -3292,6 +3294,42 @@ defines how template definitions have to be organized across ...@@ -3292,6 +3294,42 @@ defines how template definitions have to be organized across
implementation units. g++ has an implicit instantiation mechanism that implementation units. g++ has an implicit instantiation mechanism that
should work just fine for standard-conforming code. 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 @end table
@node C++ Extensions @node C++ Extensions
......
...@@ -111,7 +111,7 @@ in the following sections. ...@@ -111,7 +111,7 @@ in the following sections.
-fhuge-objects -fno-implicit-templates -finit-priority -fhuge-objects -fno-implicit-templates -finit-priority
-fno-implement-inlines -fname-mangling-version-@var{n} -fno-implement-inlines -fname-mangling-version-@var{n}
-fno-default-inline -fno-operator-names -fno-optional-diags -fpermissive -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 -fuse-cxa-atexit -fvtable-thunks -nostdinc++ -Wctor-dtor-privacy
-Wno-deprecated -Weffc++ -Wno-non-template-friend -Wnon-virtual-dtor -Wno-deprecated -Weffc++ -Wno-non-template-friend -Wnon-virtual-dtor
-Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wreorder -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 ...@@ -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 exception handling uses the same information, but it will generate it as
needed. 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 @item -fsquangle
@itemx -fno-squangle @itemx -fno-squangle
@samp{-fsquangle} will enable a compressed form of name mangling for @samp{-fsquangle} will enable a compressed form of name mangling for
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment