🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #470

Extern union declaration crashes g++1.35

#470
From: Tom Vijlbrief
Date: Tue, 03 Oct 1989 13:46
34 lines
1902 bytes
The following program crashes g++1.35
================externcrash.cc=============
extern "C" {
/* structure used to specify fields in a 32-bit pixel */
union fbunit {
    unsigned int    packed;            /* whole-sale deal */
    struct {
        unsigned int    A:8;           /* unused, for now */
        unsigned int    B:8;           /* blue channel */
        unsigned int    G:8;           /* green channel */
        unsigned int    R:8;           /* red channel */
    }               channel;           /* access per channel */
};
};


===============================
g++ -c -v externcrash.cc
g++ version 1.35.0
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 externcrash.cc /tmp/cca08984.cpp
 GNU CPP version 1.35
  /usr/local/lib/gcc-cc1plus /tmp/cca08984.cpp -quiet -dumpbase externcrash.cc -noreg -version -o /tmp/cca08984.s
  GNU C++ version 1.35.0 (68k, MIT syntax) compiled by GNU C version 1.35.
  externcrash.cc:11: Segmentation violation
  g++: Program cc1plus got fatal signal 11.
==============================

===============================================================================
Tom Vijlbrief
TNO Institute for Perception
P.O. Box 23				Phone: +31 34 63 562 11
3769 ZG  Soesterberg			E-mail: tnosoes!tom@mcvax.cwi.nl
The Netherlands				    or:	uunet!mcvax!tnosoes!tom
===============================================================================
Technical Details
Message-ID: <486@tnosoes.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!tnosoes!tom

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!tnosoes!tom
From: tom@tnosoes.UUCP (Tom Vijlbrief)
Newsgroups: gnu.g++.bug
Subject: Extern union declaration crashes g++1.35
Keywords: g++
Message-ID: <486@tnosoes.UUCP>
Date: 3 Oct 89 13:46:04 GMT
Organization: TNO Institute for Perception, Soesterberg, The Netherlands
Lines: 34