From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR c++/28986 failure to diagnose overflow for binary operators
Date: Sat, 06 Jan 2007 18:11:00 -0000 [thread overview]
Message-ID: <m37iw0uitz.fsf@zeus.integrable-solutions.net> (raw)
In-Reply-To: <6c33472e0701060949l27f86e3bx1eb762c0c93fb394@mail.gmail.com>
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:
| :ADDPATCH c++:
|
| Somehow the C++ front-end is not able to diagnose overflow for the
| result of binary operators. The fix is trivial (I can hardly believe
| that this is not a regression). In addition, I have adapted the
| overflow testcases from the C front-end to the C++ testsuite with some
| minor modifications. For reference, I also provide a diff showing
| those modifications.
|
| One particular issue that I am not sure about is whether initialisers
| for static variables need to be constant in C++ as they do in C. The
| relevant hunk in the diff between C and C++ testcases is:
|
| -/* But this expression does need to be constant. */
| +/* But this expression does need to be constant (in C++ ???). */
No, C++ does not have that restriction.
(there is a new category of constant expressions in the pipeline, but
it is too early to devise a testcase for that right now).
The patch is OK, modulo removal of the C-only restriction.
-- Gaby
next prev parent reply other threads:[~2007-01-06 18:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 17:49 Manuel López-Ibáñez
2007-01-06 18:11 ` Gabriel Dos Reis [this message]
2007-01-07 21:48 ` Manuel López-Ibáñez
2007-01-07 22:15 ` Gabriel Dos Reis
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=m37iw0uitz.fsf@zeus.integrable-solutions.net \
--to=gdr@integrable-solutions.net \
--cc=gcc-patches@gcc.gnu.org \
--cc=lopezibanez@gmail.com \
/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).