* [Bug c++/36607] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
@ 2008-12-28 0:42 ` pinskia at gcc dot gnu dot org
2008-12-30 6:10 ` rschiele at gmail dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-28 0:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-28 00:40 -------
This works for me with 4.3.2 and the current trunk.
Does it work for you?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
2008-12-28 0:42 ` [Bug c++/36607] " pinskia at gcc dot gnu dot org
@ 2008-12-30 6:10 ` rschiele at gmail dot com
2008-12-30 6:17 ` [Bug c++/36607] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: rschiele at gmail dot com @ 2008-12-30 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rschiele at gmail dot com 2008-12-30 06:07 -------
It works for you? This is weired!
Just tried it with current trunk again and it does still show exactly the same
error there.
--
rschiele at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
2008-12-28 0:42 ` [Bug c++/36607] " pinskia at gcc dot gnu dot org
2008-12-30 6:10 ` rschiele at gmail dot com
@ 2008-12-30 6:17 ` pinskia at gcc dot gnu dot org
2008-12-30 17:14 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-30 6:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-12-30 06:14 -------
Ok, it fails with -m64, looking into it.
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|x86_64-unknown-linux-gnu |
GCC host triplet|x86_64-unknown-linux-gnu |
GCC target triplet|x86_64-unknown-linux-gnu |PTR == 64 bits
Keywords| |rejects-valid
Known to fail| |4.3.3 4.4.0
Known to work| |4.0.1 4.1.1
Last reconfirmed|0000-00-00 00:00:00 |2008-12-30 06:14:14
date| |
Summary|Incorrect type diagnostic on|[4.3/4.4 Regression]
|substracting casted char |Incorrect type diagnostic on
|pointers |substracting casted char
| |pointers
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (2 preceding siblings ...)
2008-12-30 6:17 ` [Bug c++/36607] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-12-30 17:14 ` pinskia at gcc dot gnu dot org
2009-01-03 15:29 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-30 17:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-12-30 17:13 -------
I have a simple fix, the front-end should have already warned about the
conversion from a pointer to a member object to an integer type. Therefor
convert can handle OFFSET_TYPE just like INTEGER_TYPE and such.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (3 preceding siblings ...)
2008-12-30 17:14 ` pinskia at gcc dot gnu dot org
@ 2009-01-03 15:29 ` rguenth at gcc dot gnu dot org
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-03 15:29 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (4 preceding siblings ...)
2009-01-03 15:29 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-02-03 13:56 ` bonzini at gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.3 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (5 preceding siblings ...)
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
@ 2009-02-03 13:56 ` bonzini at gnu dot org
2009-02-03 15:44 ` Andrew Thomas Pinski
2009-02-03 15:44 ` pinskia at gmail dot com
` (6 subsequent siblings)
13 siblings, 1 reply; 16+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from bonzini at gnu dot org 2009-02-03 13:56 -------
ping?
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2009-02-03 13:56 ` bonzini at gnu dot org
@ 2009-02-03 15:44 ` Andrew Thomas Pinski
0 siblings, 0 replies; 16+ messages in thread
From: Andrew Thomas Pinski @ 2009-02-03 15:44 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
Sent from my iPhone
On Feb 3, 2009, at 5:56 AM, "bonzini at gnu dot org" <gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #7 from bonzini at gnu dot org 2009-02-03 13:56
> -------
> ping?
The patch was just approved last night and I will be applying it when
I get into work today.
>
>
>
> --
>
> bonzini at gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> CC| |bonzini at gnu dot org
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (6 preceding siblings ...)
2009-02-03 13:56 ` bonzini at gnu dot org
@ 2009-02-03 15:44 ` pinskia at gmail dot com
2009-02-03 22:38 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gmail dot com @ 2009-02-03 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gmail dot com 2009-02-03 15:44 -------
Subject: Re: [4.3/4.4 Regression] Incorrect type diagnostic on substracting
casted char pointers
Sent from my iPhone
On Feb 3, 2009, at 5:56 AM, "bonzini at gnu dot org" <gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #7 from bonzini at gnu dot org 2009-02-03 13:56
> -------
> ping?
The patch was just approved last night and I will be applying it when
I get into work today.
>
>
>
> --
>
> bonzini at gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> CC| |bonzini at gnu dot org
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3/4.4 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (7 preceding siblings ...)
2009-02-03 15:44 ` pinskia at gmail dot com
@ 2009-02-03 22:38 ` pinskia at gcc dot gnu dot org
2009-02-03 22:39 ` [Bug c++/36607] [4.3 " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-03 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2009-02-03 22:38 -------
Subject: Bug 36607
Author: pinskia
Date: Tue Feb 3 22:38:16 2009
New Revision: 143909
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143909
Log:
2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/36607
* convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE.
2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/36607
* g++.dg/expr/cast10.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/expr/cast10.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/convert.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (8 preceding siblings ...)
2009-02-03 22:38 ` pinskia at gcc dot gnu dot org
@ 2009-02-03 22:39 ` pinskia at gcc dot gnu dot org
2009-04-16 15:44 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-03 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2009-02-03 22:39 -------
Fixed on the trunk at least.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4 Regression] |[4.3 Regression] Incorrect
|Incorrect type diagnostic on|type diagnostic on
|substracting casted char |substracting casted char
|pointers |pointers
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (9 preceding siblings ...)
2009-02-03 22:39 ` [Bug c++/36607] [4.3 " pinskia at gcc dot gnu dot org
@ 2009-04-16 15:44 ` pinskia at gcc dot gnu dot org
2009-06-19 16:51 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-16 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2009-04-16 15:43 -------
I am no longer working on this one.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (10 preceding siblings ...)
2009-04-16 15:44 ` pinskia at gcc dot gnu dot org
@ 2009-06-19 16:51 ` rguenth at gcc dot gnu dot org
2009-06-19 21:45 ` rguenth at gcc dot gnu dot org
2009-06-19 21:46 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-19 16:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2009-06-19 16:51 -------
Testing a backport.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (11 preceding siblings ...)
2009-06-19 16:51 ` rguenth at gcc dot gnu dot org
@ 2009-06-19 21:45 ` rguenth at gcc dot gnu dot org
2009-06-19 21:46 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-19 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2009-06-19 21:44 -------
Subject: Bug 36607
Author: rguenth
Date: Fri Jun 19 21:44:24 2009
New Revision: 148730
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148730
Log:
2009-06-19 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2009-02-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C++/36607
* convert.c (convert_to_integer): Treat OFFSET_TYPE like INTEGER_TYPE.
* g++.dg/expr/cast10.C: New test.
2009-02-03 Jakub Jelinek <jakub@redhat.com>
PR target/35318
* function.c (match_asm_constraints_1): Skip over
initial optional % in the constraint.
* gcc.c-torture/compile/pr35318.c: New test.
2009-05-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/40204
* fold-const.c (fold_binary) <case BIT_AND_EXPR>: Avoid infinite
recursion if build_int_cst_type returns the same INTEGER_CST as
arg1.
* gcc.c-torture/compile/pr40204.c: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/expr/cast10.C
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr35318.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr40204.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/convert.c
branches/gcc-4_3-branch/gcc/fold-const.c
branches/gcc-4_3-branch/gcc/function.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/36607] [4.3 Regression] Incorrect type diagnostic on substracting casted char pointers
2008-06-23 16:09 [Bug c++/36607] New: Incorrect type diagnostic on substracting casted char pointers rschiele at gmail dot com
` (12 preceding siblings ...)
2009-06-19 21:45 ` rguenth at gcc dot gnu dot org
@ 2009-06-19 21:46 ` rguenth at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-19 21:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-06-19 21:46 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.3.3 4.4.0 |4.3.3
Known to work|4.0.1 4.1.1 |4.0.1 4.1.1 4.3.4 4.4.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36607
^ permalink raw reply [flat|nested] 16+ messages in thread