This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow strlen expander to fail
- To: Phil Edwards <pedwards at jaj dot com>
- Subject: Re: Patch to allow strlen expander to fail
- From: Clinton Popetz <cpopetz at cygnus dot com>
- Date: Tue, 7 Mar 2000 16:26:49 -0600
- Cc: martin at loewis dot home dot cs dot tu-berlin dot de, toon at moene dot indiv dot nluug dot nl, gcc at gcc dot gnu dot org, jbuck at racerx dot synopsys dot com, law at cygnus dot com, vonbrand at sleipnir dot valparaiso dot cl
- References: <200003072220.RAA20795@jaj.com>
On Tue, Mar 07, 2000 at 05:20:51PM -0500, Phil Edwards wrote:
> # `-fhosted'
> # Assert that compilation takes place in a hosted environment. This
> # implies `-fbuiltin'. A hosted environment is one in which the
> # entire standard library is available, and in which `main' has a
> # return type of `int'. Examples are nearly everything except a
> # kernel. This is equivalent to `-fno-freestanding'.
> #
> # `-ffreestanding'
> # Assert that compilation takes place in a freestanding environment.
> # This implies `-fno-builtin'. A freestanding environment is one
> # in which the standard library may not exist, and program startup
> # may not necessarily be at `main'. The most obvious example is an
> # OS kernel. This is equivalent to `-fno-hosted'.
>
> I couldn't tell you how those switches get used in the source, or what
> they currently affect.
Except for setting -fbuiltin appropriately, they have no effect currently.
(They set flag_hosted in c-decl.c, but nothing uses that flag.)
They were added here:
Sun Jan 19 15:05:42 1997 Peter Seebach <seebs@solon.com>
* c-decl.c (start_decl): Add code for -Wmain.
(c_decode_option): Add -fhosted, -ffreestanding, and -Wmain.
* toplev.c (lang_options): Likewise.
* c-tree.h (warn_main, flag_hosted): New variables.
but never touched afterward.
-Clint