[Bug c++/14161] [3.4/3.5 Regression] Constructors invoking priority problem

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Feb 16 18:32:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-16 18:32 -------
This works though (but does not compile with anything before 3.4.0):
#include <iostream>
#include <stdio.h>

struct P
{
P (int i) { printf("Doing %d\n", i ); }
};
static P first __attribute__ ((init_priority (900))) (900) ;
static P second __attribute__ ((init_priority (300))) (300);
static P third __attribute__ ((init_priority (200))) (3);

int main ()
{
std::cout << "Blah." << std::endl;
return 0;
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.3
   Target Milestone|---                         |3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14161



More information about the Gcc-bugs mailing list