This is the mail archive of the gcc-bugs@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]

[Bug c++/21089] [4.0/4.1 Regression] C++ front-end does not "inline" the static const double


------- Additional Comments From schlie at comcast dot net  2005-04-18 19:36 -------
(In reply to comment #11)

I believe the optimization necessitates the variable's declaration be changed
(either explicitly, or by implication):

 static const double b = a+1.0; => const double b = a+1.0;

If it's static-const value can't be pre-computed at compile time. (as opposed
to allowing a non-const-literal value to initialize a global static const object).

 (as with: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20912 )




-- 


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


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