This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ostream and long long
- To: Andris Pavenis <andris at hal dot astr dot lu dot lv>
- Subject: Re: ostream and long long
- From: David Durham <david dot durham at wcom dot com>
- Date: Thu, 26 Jul 2001 11:14:10 -0500
- Cc: Phil Edwards <pedwards at disaster dot jaj dot com>,Gabriel Dos Reis <gdr at codesourcery dot com>, gcc-bugs at gcc dot gnu dot org
- References: <Pine.LNX.4.33.0107261104440.29768-100000@hal.astr.lu.lv>
Well.. uh oh... Perhaps this bug shows up because I just went ahead and
defined _GLIBCPP_USE_LONG_LONG in c++config.h, but now the following
code compiles fine, but is incorrect...
-------------------------
#include <iostream.h>
int main()
{
long long int i=10LL;
cout << i << endl;
return(0);
}
------------------------
Again, it compiles fine, but it prints '0' to the console...
Remember, this is a sparc-sun-solaris2.5.1 configuration
Any ideas?
-- Davy
On 26 Jul 2001 11:05:47 +0300, Andris Pavenis wrote:
>
>
> On Wed, 25 Jul 2001, Phil Edwards wrote:
>
> > On Wed, Jul 25, 2001 at 05:24:09PM -0500, David Durham wrote:
> > > Well... the only thing in config.log I found about 'long long' is this:
> > >
> > > 607: configure:3522: checking for enabled ISO C99 support
> > > 608: configure:3568: checking for enabled long long support
> > > 609: configure:3578: checking for c header strategy to use
> >
> > How about c++config.h, either in your build or installation directory?
> >
>
> Of course it could be possible to put it in c++config.h, but why to do
> it for each target when it should be detected by configure?
>
> Andris
>
>