🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.apps
Article #81

Re: SGI's C++ compiler and the boolean type

#81
From: Kent Sandvik
Date: Wed, 10 Apr 1996 00:51
33 lines
1960 bytes
In article <4kefm7$oao@ncar.ucar.edu>,
jadams@sage.cgd.ucar.edu (James Adams) wrote:
  >	I have begun using SGI's C++ compiler (Translator 4.0) since
  >I want to use their CASEVision debugger.  I have previously used g++
  >to do my compilation, and it correctly interpreted the "bool" type
  >without any problems.  However now that I am using SGI's compiler I
  >get all kinds of compiler errors whenever it encounters "bool", "true",
  >or "false" in my codes.  The only workaround I've been able to come up
  >with is to include the following lines in my header file:
  >
  >typedef int     bool;
  >#define true    1
  >#define false   0
  
bool is a fairly new ANSI C++ draft proposal keyword; I wish someone would
finally finish the ANSI C++ specs, seems to drag on and on...

Anyway, the keyword is supported starting with the 6.2 compilers, chapter 3
of the forthcoming 6.2 release notes have information about what's new,
including support for bool and wchar_t types. Meanwhile you could use the
trick you are using above.

Note that when bool is used in the 6.2 compilers, true and false will be
reserved keywords. The compiler will also then predefine a macro called
_BOOL, so you could use this label as well.

--Kent


          Kent Sandvik, Silicon Graphics, Inc.    Member of Technical Staff
                             Email: sandvik@sgi.com  Phone: +1 415 933-6417
                    http://reality.sgi.com/sandvik/  (sgi http:/kent.engr/)
                                             "May all developers be happy."
Technical Details
Message-ID: <AD90462796682652E@mac-sandvik.engr.sgi.com>
Path: arc1-ca.pugleaf.net!news.corp.sgi.com!user
References: <4kefm7$oao@ncar.ucar.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.corp.sgi.com!user
From: sandvik@sgi.com (Kent Sandvik)
Newsgroups: comp.sys.sgi.apps,comp.lang.c++
Subject: Re: SGI's C++ compiler and the boolean type
Date: Tue, 09 Apr 1996 16:51:51 -0800
Organization: Silicon Graphics, Inc.
Message-ID: <AD90462796682652E@mac-sandvik.engr.sgi.com>
References: <4kefm7$oao@ncar.ucar.edu>
NNTP-Posting-Host: mac-sandvik.engr.sgi.com