ostream and long long
Phil Edwards
pedwards@disaster.jaj.com
Wed Jul 25 14:12:00 GMT 2001
On Wed, Jul 25, 2001 at 04:04:59PM -0500, David Durham wrote:
> Actually, I may have seen what Andris is saying... I'm on solaris-2.5.1
> and I recompiled with --enable-long-long and 'ostream << long long int'
> is still not valid... I even opened up the header file
> include/g++-v3/bits/std_ostream.h and see that operator<<(ostream &,
> long long) is defined IF _GLIBCPP_USE_LONG_LONG is defined... But
> apparently _GLIBCPP_USE_LONG_LONG was not defined even though I re-ran
> configure --enable-long-long on a new empty build directory
You don't get _GLIBCPP_USE_LONG_LONG just because --enable-long-long was
passed during configuration.
You get _GLIBCPP_USE_LONG_LONG if and only if both of the following are true:
1) Either --enable-long-long was passed, or it was on by default.
2) The underlying support routines necessary to make 'long long' work
are found during configuration.
If those hold, then 'configure' defines _GLIBCPP_USE_LONG_LONG to let
the rest of the library code know that 'long long' can be safely used.
It's not meant for users to define on its own.
So. If you have done (1) but _GLIBCPP_USE_LONG_LONG is undefined,
then (2) is failing. You should look in your build directory's
<cpu>-<vendor>-<OS>/libstdc++-v3/config.log to see the results of the
configure tests, and see why the tests for 'long long' support are failing
for you.
Phil
--
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
- anonymous Egyptian scribe, c.1700 BC
More information about the Gcc-bugs
mailing list