This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Patch to make constants visible at -O0
- To: Geert Bosch <bosch at gnat dot com>
- Subject: Re: [Ada] Patch to make constants visible at -O0
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 10 Oct 2001 16:40:55 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <Pine.GSO.4.10.10110101748460.5314-100000@nile.gnat.com>
On Wed, Oct 10, 2001 at 05:49:51PM -0400, Geert Bosch wrote:
> * decl.c: (gnat_to_gnu_entity, case object): Also materialize
> VAR_DECL for constant if not Is_Public but -O0.
I don't see what -O0 has to do with it. Really these should
be emitted all the time. They never actually create data in
the program.
Compare with the following c++ program:
const int foo = 42;
Note that C++, unline C, defines "foo" to be an integer constant
expression; foo need not appear in any data segment.
Dwarf2, for instance, is able to represent this directly in
the debugging info. Though I see that there is a bug in that
at the moment...
r~