From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9910 invoked by alias); 20 Jul 2002 18:36:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 9891 invoked by uid 71); 20 Jul 2002 18:36:00 -0000 Resent-Date: 20 Jul 2002 18:36:00 -0000 Resent-Message-ID: <20020720183600.9890.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, gonz@bluel.com Received: (qmail 18897 invoked by uid 61); 20 Jul 2002 10:33:16 -0000 Message-Id: <20020720103316.18896.qmail@sources.redhat.com> Date: Sat, 20 Jul 2002 11:36:00 -0000 From: gonz@bluel.com Reply-To: gonz@bluel.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7362: "Pack" attribute causes compiler error on empty structs X-SW-Source: 2002-07/txt/msg00582.txt.bz2 List-Id: >Number: 7362 >Category: c++ >Synopsis: "Pack" attribute causes compiler error on empty structs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sat Jul 20 11:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Pete Gonzalez >Release: gcc version 2.95.2 >Organization: >Environment: Occurs on the GCC shipping with the current distribution of Debian Linux. Originally discovered with GCC 3.0.4 on Win32. >Description: The "__attribute__((packed))" modifier cannot be applied to an empty struct because it produces an Internal Compiler Error. >How-To-Repeat: int test() { __attribute__((packed)) struct TEmpty { }; // <-- crash here } >Fix: The correct behavior is probably to reduce the size of the struct from 4 to 1. >Release-Note: >Audit-Trail: >Unformatted: