ostream and long long

Phil Edwards pedwards@disaster.jaj.com
Tue Jul 24 18:50:00 GMT 2001


On Tue, Jul 24, 2001 at 11:35:04PM +0200, Gabriel Dos Reis wrote:
> David Durham <david.durham@wcom.com> writes:
> 
> | Well, with gcc 3.0 (solaris 2.5.1) compiling with c++ (as opposed to g++
> | or gcc)
> 
> It seems like you didn't configure GCC with --enable-long-long.  Did you?

I wish the compiler had some sort of __builtin_compile_error(), like #error
but only triggered if the code segment in question is actually compiled.

  ostream& operator<< (ostream&, long long)
  {
  #ifdef _GLIBCPP_USE_LONG_LONG
      ... what we currently have ...
  #else
      __builtin_compile_error("support for `long long' not configured, see "
                              "<the location of v3's configopts.html>");
  #endif
  }


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