This is the mail archive of the gcc-prs@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: c++/9393: [3.2/3.3/3.4 regression] Anonymous namespaces and compiling the same file twice


The following reply was made to PR c++/9393; it has been noted by GNATS.

From: Geoffrey Keating <geoffk at apple dot com>
To: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, bangerth at ices dot utexas dot edu,
   gcc-prs at gcc dot gnu dot org
Cc:  
Subject: Re: c++/9393: [3.2/3.3/3.4 regression] Anonymous namespaces and compiling the same file twice
Date: Thu, 10 Apr 2003 16:49:01 -0700

 A better testcase is:
 
 #include <iostream>
 namespace {
    struct S {
        S();
    };
    S::S () { std::cout << "One more call" << std::endl; }
    S local_s;
 }
 
 (you can insert anything you like in the constructor).  You can have as 
 many of these as you like in your program.
 
 One additional problem with the existing behaviour is that you get 
 "determinism" only if inode numbers and modification times don't 
 change.  This means that (a) it's not reproducible; users normally 
 can't control inode numbers; and (b) it's fragile, because both of 
 these can quietly vary, especially on network file systems.
 


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