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

Reply via email to