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

Re: High priority bug?


Carlo Wood <carlo@alinoe.com> writes:

| I just did ran into a weird bug, not sure if you want to fix it
| in 3.0 however.  Its kinda hard to produce a short test case,
| so I'd like to first ask if this is considered a high priority
| bug before trying.
| 
| The problem is as follows:
| 
| In a shared library I am using the following definition:
| 
|   #include <limits>
|   int const failure = std::numeric_limits<int>::min();
| 
| And I assumed that `failure' was a _constant_ 

No, it is not. Or more precisely, it is not a constant integral
expression. It denotes a const object, but not a constant integral
expression: its value is dynamically computated and as such is subject
to the inter-translation unit initialization problems.

-- Gaby


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