public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5633: bool is too big
@ 2002-02-20  8:16 Gabriel Dos Reis
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Dos Reis @ 2002-02-20  8:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/5633; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@codesourcery.com>
To: harald.soleng@nr.no
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/5633: bool is too big
Date: 20 Feb 2002 16:42:12 +0100

 harald.soleng@nr.no writes:
 
 [...]
 
 | >Description:
 | The bool variable takes up 4 bytes or 32 bits where 1 bit 
 | is sufficient.
 
 A bit isn't an object therefore we can't use a "1 bit" to represent bool
 objects, even if in the abstract it would suffice.
 
 The new ABI mandates sizeof (bool) == 1, so the above is no
 longer an issue.
 
 -- Gaby


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/5633: bool is too big
@ 2002-02-08  3:16 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-02-08  3:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, harald.soleng, nobody

Synopsis: bool is too big

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Feb  8 03:16:52 2002
State-Changed-Why:
    From http://www.codesourcery.com/cxx-abi/abi.html,
    which describes the ABI in gcc 3.0 and above,
    2.2 POD Data Types 
    
    The size and alignment of C POD types is as specified by the base (C) ABI. Type bool has size and alignment 1. All of these types have data size and non-virtual size equal
    to their size. (We ignore tail padding for PODs because the Standard does not allow us to use it for anything else.) 

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5633


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/5633: bool is too big
@ 2002-02-08  3:06 harald.soleng
  0 siblings, 0 replies; 3+ messages in thread
From: harald.soleng @ 2002-02-08  3:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5633
>Category:       c++
>Synopsis:       bool is too big
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 08 03:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     harald.soleng@nr.no
>Release:        gcc-2.95.3
>Organization:
>Environment:
sparc-solaris
>Description:
The bool variable takes up 4 bytes or 32 bits where 1 bit 
is sufficient.

For large bool arrays this is a waste of memory.
Why not try to reduce this waste of memory?
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-20 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20  8:16 c++/5633: bool is too big Gabriel Dos Reis
  -- strict thread matches above, loose matches on Subject: below --
2002-02-08  3:16 nathan
2002-02-08  3:06 harald.soleng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).