public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules
@ 2007-06-08 18:44 sylvain dot pion at sophia dot inria dot fr
2007-06-11 21:19 ` [Bug c++/32260] [4.3 Regression] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2007-06-08 18:44 UTC (permalink / raw)
To: gcc-bugs
The following code, compiled with -O2 -Wall (g++ 4.3 as of 20070607),
produces the following unexpected/annoying warning:
test_typeinfo.cpp: In function 'int main()':
test_typeinfo.cpp:5: warning: dereferencing type-punned pointer will break
strict-aliasing rules
test_typeinfo.cpp:5: warning: unused variable 't'
~> cat test_typeinfo.cpp
#include <typeinfo>
int main()
{
const std::type_info & t = typeid(int);
}
Is this really meant to warn for such a code???
--
Summary: too many warning: dereferencing type-punned pointer will
break strict-aliasing rules
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sylvain dot pion at sophia dot inria dot fr
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
@ 2007-06-11 21:19 ` pinskia at gcc dot gnu dot org
2007-06-29 18:43 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 21:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-11 21:19 -------
Confirmed, I have not looked into this close enough but this is a front-end bug
as the type (and aliasing set) of the typeid variable is different from
std::type_info's.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |alias, diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2007-06-11 21:19:44
date| |
Summary|too many warning: |[4.3 Regression] too many
|dereferencing type-punned |warning: dereferencing type-
|pointer will break strict- |punned pointer will break
|aliasing rules |strict-aliasing rules
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
2007-06-11 21:19 ` [Bug c++/32260] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-06-29 18:43 ` mmitchel at gcc dot gnu dot org
2007-09-28 17:04 ` pcarlini at suse dot de
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-06-29 18:43 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
2007-06-11 21:19 ` [Bug c++/32260] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-06-29 18:43 ` mmitchel at gcc dot gnu dot org
@ 2007-09-28 17:04 ` pcarlini at suse dot de
2007-10-26 9:01 ` pcarlini at suse dot de
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2007-09-28 17:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2007-09-28 17:04 -------
Short term at least, could be considered a duplicate of PR32256 (and PR32368).
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
` (2 preceding siblings ...)
2007-09-28 17:04 ` pcarlini at suse dot de
@ 2007-10-26 9:01 ` pcarlini at suse dot de
2007-11-01 11:57 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2007-10-26 9:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pcarlini at suse dot de 2007-10-26 09:00 -------
*** Bug 33902 has been marked as a duplicate of this bug. ***
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |benoit dot hudson at gmail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
` (3 preceding siblings ...)
2007-10-26 9:01 ` pcarlini at suse dot de
@ 2007-11-01 11:57 ` jakub at gcc dot gnu dot org
2007-11-01 22:51 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-01 11:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2007-11-01 11:57 -------
Testing a fix.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-06-11 21:19:44 |2007-11-01 11:57:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
` (4 preceding siblings ...)
2007-11-01 11:57 ` jakub at gcc dot gnu dot org
@ 2007-11-01 22:51 ` jakub at gcc dot gnu dot org
2007-11-01 23:09 ` jakub at gcc dot gnu dot org
2007-11-11 14:04 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-01 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2007-11-01 22:50 -------
Subject: Bug 32260
Author: jakub
Date: Thu Nov 1 22:50:32 2007
New Revision: 129835
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129835
Log:
PR c++/32260
* rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
(typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
as for std::type_info.
* g++.dg/rtti/typeid7.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/rtti/typeid7.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/rtti.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
` (5 preceding siblings ...)
2007-11-01 22:51 ` jakub at gcc dot gnu dot org
@ 2007-11-01 23:09 ` jakub at gcc dot gnu dot org
2007-11-11 14:04 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-01 23:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2007-11-01 23:09 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/32260] [4.3 Regression] too many warning: dereferencing type-punned pointer will break strict-aliasing rules
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
` (6 preceding siblings ...)
2007-11-01 23:09 ` jakub at gcc dot gnu dot org
@ 2007-11-11 14:04 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2007-11-11 14:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pcarlini at suse dot de 2007-11-11 14:04 -------
*** Bug 34066 has been marked as a duplicate of this bug. ***
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |guillaume dot melquiond at
| |ens-lyon dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32260
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-11 14:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-08 18:44 [Bug c++/32260] New: too many warning: dereferencing type-punned pointer will break strict-aliasing rules sylvain dot pion at sophia dot inria dot fr
2007-06-11 21:19 ` [Bug c++/32260] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-06-29 18:43 ` mmitchel at gcc dot gnu dot org
2007-09-28 17:04 ` pcarlini at suse dot de
2007-10-26 9:01 ` pcarlini at suse dot de
2007-11-01 11:57 ` jakub at gcc dot gnu dot org
2007-11-01 22:51 ` jakub at gcc dot gnu dot org
2007-11-01 23:09 ` jakub at gcc dot gnu dot org
2007-11-11 14:04 ` pcarlini at suse dot de
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).