[Ada] Patch to make constants visible at -O0

Richard Henderson rth@redhat.com
Wed Oct 10 16:40:00 GMT 2001


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~



More information about the Gcc-patches mailing list