This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14161] [3.4/3.5 Regression] Constructors invoking priority problem
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2004 18:32:39 -0000
- Subject: [Bug c++/14161] [3.4/3.5 Regression] Constructors invoking priority problem
- References: <20040216154444.14161.kczyz@zeus.polsl.gliwice.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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