[Bug c++/25365] New: g++ crashes with segmentation fault, when -Wall is active
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 // 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 { charint8_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
[Bug c++/25365] g++ crashes with segmentation fault, when -Wall is active
--- 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