public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25365] New: g++ crashes with segmentation fault, when -Wall is active
@ 2005-12-12 11:45 pgunreben at lucent dot com
2005-12-12 12:00 ` [Bug c++/25365] " pgunreben at lucent dot com
2005-12-12 15:04 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: pgunreben at lucent dot com @ 2005-12-12 11:45 UTC (permalink / raw)
To: gcc-bugs
Hi,
the g++ crashes with segmantation fault, when compiling the following code
snippet with "g++ -c -Wall". It compiles without the "-Wall" option.
============8<================
#include <stdint.h>
// http://www.oreillynet.com/pub/a/network/2003/10/07/michael_barr.html
// Example 2. An anonymous union allows the compiler to report
// typedef errors automatically
static union
{
char int8_t_incorrect[sizeof( int8_t) == 1];
char uint8_t_incorrect[sizeof( uint8_t) == 1];
char int16_t_incorrect[sizeof( int16_t) == 2];
char uint16_t_incorrect[sizeof(uint16_t) == 2];
char int32_t_incorrect[sizeof( int32_t) == 4];
char uint32_t_incorrect[sizeof(uint32_t) == 4];
};
============8<================
--
Summary: g++ crashes with segmentation fault, when -Wall is
active
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pgunreben at lucent dot com
GCC build triplet: i686-suse-linux
GCC host triplet: i686-suse-linux
GCC target triplet: i686-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25365
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/25365] g++ crashes with segmentation fault, when -Wall is active
2005-12-12 11:45 [Bug c++/25365] New: g++ crashes with segmentation fault, when -Wall is active pgunreben at lucent dot com
@ 2005-12-12 12:00 ` pgunreben at lucent dot com
2005-12-12 15:04 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pgunreben at lucent dot com @ 2005-12-12 12:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pgunreben at lucent dot com 2005-12-12 12:00 -------
it doesn't crash, if I use the union in the code, e.g.:
=============8<=================
int main() {
void *p;
p = int32_t_incorrect;
return 0;
}
=============8<=================
--
pgunreben at lucent dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|g++ crashes with |g++ crashes with
|segmentation fault, when - |segmentation fault, when -
|Wall is active |Wall is active
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25365
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/25365] g++ crashes with segmentation fault, when -Wall is active
2005-12-12 11:45 [Bug c++/25365] New: g++ crashes with segmentation fault, when -Wall is active pgunreben at lucent dot com
2005-12-12 12:00 ` [Bug c++/25365] " pgunreben at lucent dot com
@ 2005-12-12 15:04 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-12 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-12-12 15:04 -------
Fixed already in 4.0.3.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |ice-on-valid-code
Resolution| |FIXED
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25365
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-12 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 11:45 [Bug c++/25365] New: g++ crashes with segmentation fault, when -Wall is active pgunreben at lucent dot com
2005-12-12 12:00 ` [Bug c++/25365] " pgunreben at lucent dot com
2005-12-12 15:04 ` pinskia at gcc dot gnu dot org
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).