public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Zack Weinberg <zack@codesourcery.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c/6300: [PATCH] sparcv9-sun-solaris2.7 gcc-3.1 C testsuite failure in gcc.dg/cpp/charconst.c
Date: Mon, 22 Apr 2002 00:36:00 -0000	[thread overview]
Message-ID: <20020422073601.512.qmail@sources.redhat.com> (raw)

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

From: Zack Weinberg <zack@codesourcery.com>
To: Neil Booth <neil@daikokuya.demon.co.uk>
Cc: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>, gcc-gnats@gcc.gnu.org,
	gcc-patches@gcc.gnu.org
Subject: Re: c/6300: [PATCH] sparcv9-sun-solaris2.7 gcc-3.1 C testsuite failure in gcc.dg/cpp/charconst.c
Date: Mon, 22 Apr 2002 00:33:05 -0700

 On Mon, Apr 22, 2002 at 07:53:19AM +0100, Neil Booth wrote:
 > > The problem is that cpp_interpret_charconst will happily pass back a
 > > value wider than the mode we actually want, as long as it fits in
 > > HOST_WIDE_INT.
 > 
 > Thanks for figuring this out, Zack.  However, this makes it sound
 > like the correct fix is in cpp_interpret_charconst, no?  Is this
 > something that will get magically fixed when CPP arithmetic is done
 > properly?
 
 I'm not sure what you mean by "done properly".  I see two latent bugs,
 both of which are straightforward to fix on the mainline, but neither
 is necessarily what you're thinking of.
 
 One is that we really need to get cpplib using accurate definitions
 for __WCHAR_TYPE__ etc.  Currently the "character constant too long"
 warning issues based on MAX_WCHAR_TYPE_SIZE, which is incorrect if
 WCHAR_TYPE_SIZE happens not to be that big in the current run.  This
 is not practical to fix on the branch, but easy on the mainline as
 long as we take care not to make it harder to separate the library so
 GDB can use it.
 
 The other is that truncation isn't happening as required when these
 constants are used in #if expressions.  This could be fixed for the
 branch but I don't think it's worth it.  Uses of multi-character
 character constants are rare, and programs that depend on their being
 truncated "properly" in #if expressions... well, I can't think of one
 that isn't a contrived example.
 
 zw


             reply	other threads:[~2002-04-22  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22  0:36 Zack Weinberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22 14:46 Zack Weinberg
2002-04-22 12:46 Kaveh R. Ghazi
2002-04-22 10:06 Neil Booth
2002-04-22  0:26 Zack Weinberg
2002-04-21 23:56 Neil Booth
2002-04-21 18:26 Zack Weinberg

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=20020422073601.512.qmail@sources.redhat.com \
    --to=zack@codesourcery.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /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).