[Bug c++/11211] New: trivial static initializers of const objects should be done at compile time
pinskia@physics.uc.edu
gcc-bugzilla@gcc.gnu.org
Mon Jun 16 16:43:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11211
Summary: trivial static initializers of const objects should be
done at compile time
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@physics.uc.edu
CC: eric-gcc@omnifarious.org,gcc-bugs@gcc.gnu.org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Compile this code and see that __static_initialization_and_destruction_0 exists and but it should
produce static initializers:
class Fred {
public:
Fred(int x) : x_(x) { }
private:
int x_;
};
class Barney : public Fred {
public:
Barney(int x, int y) : Fred(x), y_(y) { }
private:
int y_;
};
extern const Barney abarney(5, 6);
extern const Fred afred(2);
More information about the Gcc-bugs
mailing list