public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/37561] [4.4 Regression] Revision 140405 caused g++.old-deja/g++.mike/warn1.C
Date: Wed, 17 Sep 2008 16:12:00 -0000 [thread overview]
Message-ID: <20080917161120.10585.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37561-682@http.gcc.gnu.org/bugzilla/>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]
------- Comment #2 from hjl dot tools at gmail dot com 2008-09-17 16:11 -------
(In reply to comment #1)
> I tested with -m32 on powerpc64-linux, not with both -m32/-m64 which would have
> caught this; I'll test with both for related patches.
>
> The test previously used { dg-warning "" }, which matched any message from that
> line. The patch, in preparation to using new versions of dg-error and
> dg-warning that actually check for "warning" and "error", changed that to {
> dg-error "lvalue" }, which matches the error message for -m32 but not the
> warning message for -m64. It's a bug in the compiler that the error isn't
> reported for -m64, and the change to the test merely detected that.
>
> This should be a C++ bug, not a testsuite bug.
>
I am not sure if it is a C++ bug. The differences between -m32
and -m64 are the sizes of __SIZE_TYPE__, int and pointer. Replace
int with long gives me
[hjl@gnu-6 tmp]$ cat x.cc
typedef char * charptr;
typedef __SIZE_TYPE__ size_t;
char c[]={'A','B','C','D'};
long i=size_t(&c);
long *pp=&i;
void foo() { }
int main()
{
charptr(*pp)++; // { dg-warning "" }
return 0;
}
[hjl@gnu-6 tmp]$ gcc -Wall x.cc -S -m64
x.cc: In function âint main()â:
x.cc:9: error: lvalue required as increment operand
[hjl@gnu-6 tmp]$ gcc -Wall x.cc -S -m32
x.cc: In function âint main()â:
x.cc:9: error: lvalue required as increment operand
[hjl@gnu-6 tmp]$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37561
next prev parent reply other threads:[~2008-09-17 16:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 14:50 [Bug testsuite/37561] New: " hjl dot tools at gmail dot com
2008-09-17 16:02 ` [Bug testsuite/37561] " janis at gcc dot gnu dot org
2008-09-17 16:12 ` hjl dot tools at gmail dot com [this message]
2008-09-17 17:03 ` janis at gcc dot gnu dot org
2008-09-17 17:39 ` janis at gcc dot gnu dot org
2008-09-19 18:26 ` janis at gcc dot gnu dot org
2008-09-20 3:10 ` [Bug c++/37561] " pinskia at gcc dot gnu dot org
2008-10-07 14:10 ` [Bug c++/37561] [4.2/4.3/4.4 " jakub at gcc dot gnu dot org
2008-10-22 3:21 ` mmitchel at gcc dot gnu dot org
2008-11-14 16:12 ` jakub at gcc dot gnu dot org
2008-11-15 9:55 ` jakub at gcc dot gnu dot org
2008-11-15 9:58 ` [Bug c++/37561] [4.2/4.3 " jakub at gcc dot gnu dot org
2009-01-08 22:58 ` rguenth at gcc dot gnu dot org
2009-07-10 15:55 ` rguenth at gcc dot gnu dot org
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=20080917161120.10585.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).