This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Results for g++ 3.1 application testing on i686-pc-linux-gnu


Richard Henderson <rth@redhat.com> writes:

| On Tue, Mar 05, 2002 at 01:11:13PM -0800, Benjamin Kosnik wrote:
| > It's annoying to me to see, for every header with
| > 
| > const int l = 5;
| > 
| > in it, this in every object file
| > 
| > 00000000 r l
| 
| I thought C++ allowed us to never emit these unless their 
| address is taken?  If that's the case, I'd consider this
| a (qoi) bug.

Incidently, I think there is a real bug in the compiler.  Here is what
happens:

    // x.H
     exten const int l;

    // x.C
    #include "x.H"
    const int l = 9;	// at this point 'l' should emitted global.

   // y.C
   #include "x.H"

     // y.C references l.

y.o should be successfully linked against x.o.

-- Gaby


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