This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Ada] Patch to make constants visible at -O0


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]