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: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 07 Mar 2000 23:24:27 +0100
- CC: martin at loewis dot home dot cs dot tu-berlin dot de, 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
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200003072220.RAA20795@jaj.com>
Phil Edwards wrote:
> I wrote:
[ freestanding vs hosted execution environment in C ]
> > I think this can only be solved by having a compile time switch that
> > makes clear which of the two environments one compiles for. It's
> > amazing to me that a compiler that's used so much in the embedded
> > community, doesn't even _have_ -hosted and -freestanding options.
>
> We're still talking about GCC, right? Your wish has already been granted.
> :-) From the pages for 2.95.2:
>
> # `-fhosted'
> # `-ffreestanding'
Yes, in Dutch we would call this "papier is geduldig"
> I couldn't tell you how those switches get used in the source, or what
> they currently affect.
Use grep - it helps !
% grep freestanding *.c
c-decl.c: else if (!strcmp (p, "-fhosted") || !strcmp (p,
"-fno-freestanding"))
c-decl.c: else if (!strcmp (p, "-ffreestanding") || !strcmp (p,
"-fno-hosted"))
c-decl.c: /* We set this to 2 here, but 1 in -Wmain, so
-ffreestanding can turn
toplev.c: { "-ffreestanding",
toplev.c: { "-fno-freestanding", "" },
[ Ah, so it *has* them ]
% grep freestanding *.h
c-tree.h:/* Nonzero means environment is hosted (i.e., not freestanding)
*/
% view c-tree.h
[ ... ]
/* Nonzero means environment is hosted (i.e., not freestanding) */
extern int flag_hosted;
[ ... ]
% grep flag_hosted *.c
c-decl.c:int flag_hosted = 1;
c-decl.c: flag_hosted = 1;
c-decl.c: flag_hosted = 0;
That's all, folks !
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://gcc.gnu.org/onlinedocs/g77_news.html
... Slowly recovering from the Olympic Gardens ....