public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <jsm@polyomino.org.uk>
To: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Cc: gcc@gcc.gnu.org
Subject: Re: SRA problem with uninitialzed fields
Date: Fri, 24 Sep 2004 18:50:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.61.0409241607300.10667@digraph.polyomino.org.uk> (raw)
In-Reply-To: <10409241604.AA01618@vlsi1.ultra.nyu.edu>

On Fri, 24 Sep 2004, Richard Kenner wrote:

> But what about the C test case I sent?  Isn't that valid C++ also and
> wouldn't it have the problem I mentioned if that hook is false?

C++ bit-fields have a restricted width representation but their type is 
the underlying type rather than a special restricted width type.  (Thus 
e.g. with 64-bit long, 32-bit int, unsigned long:40 + unsigned long:40 has 
type unsigned long:40 in C but type unsigned long in C++.)  A proper 
implementation that keeps the types those that accord with the language 
semantics would be for the GIMPLE generated to include explicit mask 
operations for assignments to bit-fields.  If it doesn't represent that 
assignment to a bit-field from the same type may change the value, then 
there are likely to be problems.  At one point there were, but I don't see 
such problems at present in some quick tests.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
  http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 4.0
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

  reply	other threads:[~2004-09-24 16:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-24 18:43 Richard Kenner
2004-09-24 18:50 ` Joseph S. Myers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-09-24 18:53 Richard Kenner
2004-09-24 19:02 ` Joseph S. Myers
2004-09-25  2:38   ` Robert Dewar
2004-09-25  2:59     ` Joseph S. Myers
2004-09-24 16:55 Richard Kenner
2004-09-24 18:23 ` Joseph S. Myers
2004-09-24 16:01 Richard Kenner
2004-09-24 16:16 ` Andrew Pinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0409241607300.10667@digraph.polyomino.org.uk \
    --to=jsm@polyomino.org.uk \
    --cc=gcc@gcc.gnu.org \
    --cc=kenner@vlsi1.ultra.nyu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).