static const double pi = 3.1415;
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Feb 19 09:22:00 GMT 2003
kaih@khms.westfalen.de (Kai Henningsen) writes:
| Note I'm not arguing for or against any particular extension here.
|
| That said - what would be hard about allowing to initialize PODs with
| constant expressions?
I don't know how hard it would be. But I do know for sure that a
couple of bugs on that issue have made their ways into the compiler.
Getting rid of that undocumented extension certainly makes the job of
implementing the language easier.
Now, if you want that feature, maybe you might come with a detailled
specification -- no, the undocumented extension didn't describe the
semantics.
what is clear is that integral constant and enumeration are considered
compile-time entities and as such maybe "optimized" away by the
compiler -- that is the main prupose of the standard feature.
However, the picture is less clear when you consider non-compile time
entities.
-- Gaby
More information about the Gcc
mailing list