From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30473 invoked by alias); 7 Jul 2004 12:07:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30463 invoked from network); 7 Jul 2004 12:07:46 -0000 Received: from unknown (HELO lon-mail-2.gradwell.net) (193.111.201.126) by sourceware.org with SMTP; 7 Jul 2004 12:07:46 -0000 Received: (qmail 29874 invoked from network); 7 Jul 2004 12:07:45 -0000 Received: from digraph.polyomino.org.uk (postmaster%pop3.polyomino.org.uk@81.187.227.50) by lon-mail-2.gradwell.net with SMTP; 7 Jul 2004 12:07:45 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.34) id 1BiBDF-0002uf-Mn; Wed, 07 Jul 2004 12:07:45 +0000 Date: Wed, 07 Jul 2004 12:10:00 -0000 From: "Joseph S. Myers" X-X-Sender: jsm28@digraph.polyomino.org.uk To: Jan Beulich cc: gcc-patches@gcc.gnu.org Subject: Re: make #pragma pack() implementation consistent with other compilers (PR c/7054) In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-07/txt/msg00585.txt.bz2 On Wed, 7 Jul 2004, Jan Beulich wrote: > 2004-07-07 Jan Beulich > > PR c/7054 > * tree.h (initial_max_fld_align): Declare > * stor-layout.c (initial_max_fld_align): Define and initialize. > (maximum_field_alignment): Initialize to the same value. > * common.opt: Add -fpack-struct= variant of switch. > * opts.c: Handle -fpack-struct= variant of switch. > * c-pragma.c: Change #pragma pack() handling so that is becomes > compatible to other compilers: accept individual 'push' > argument, > make final pop restore (command line) default, correct > interaction > of push/pop and sole specification of a new alignment (so that > the > sequence #pragma pack(push) - #pragma pack() becomes > identical > to #pragma pack(push, ). > * testsuite/gcc.dg/pack-test-2.c: Adjust to permit and check > #pragma pack(push). We can't consider patches without proper documentation. This needs (a) documentation for the new command-line option syntax, (b) documentation for the pragma changes (and it seems for the pragma itself, which as you evidently understand what it's meant to do at present you're best placed to write), (c) for what seems to be a new target macro DEFAULT_PACK_STRUCT. > /home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/g++.dg/abi/vbase10.C 2004-01-08 > 04:32:11.000000000 +0100 > +++ > 2004-07-05.10.09/gcc/testsuite/g++.dg/abi/vbase10.C 2004-05-27 > 10:57:09.000000000 +0200 Not mentioned in the ChangeLog entry. Why is this testcase being changed? > /home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/Wpadded.c 2003-06-10 > 01:04:50.000000000 +0200 > +++ 2004-07-05.10.09/gcc/testsuite/gcc.dg/Wpadded.c 2004-05-26 > 15:38:24.000000000 +0200 Likewise. > /home/jbeulich/src/gcc/mainline/2004-07-05.10.09/gcc/testsuite/gcc.dg/c99-flex-array-4.c 2002-08-17 > 16:48:28.000000000 +0200 > +++ > 2004-07-05.10.09/gcc/testsuite/gcc.dg/c99-flex-array-4.c 2004-05-26 > 17:19:15.000000000 +0200 Likewise. It seems clearly inappropriate for standards testcases to have any special options like you're adding. (But this testcase is expected to become obsolete, as the draft C99 TC2 (N1060) would remove the defective requirement from the standard.) -- Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/ jsm@polyomino.org.uk (personal mail) jsm28@gcc.gnu.org (Bugzilla assignments and CCs)