This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: make #pragma pack() implementation consistent with othercompilers (PR c/7054)


For the documentation requirements (I'm still learning doing 'open
source', and previously I was used to there being someone else taking
care of documentation stuff, after all I'm not a technical writer but a
programmer): Can you suggest an obvious to use editor for the .texi
files (not a plain text one, so I won't have to twiddle the directives
in there a hundred times)?

For the unmentioned test case changes: Without them these tests fail if
you have a target that requires less than word alignment as the default
setting (which is what DEFAULT_PACK_STRUCT is used for). Thus for such
targets the packing value has to be set high enough (and thus the value
8 to accomodate all targets up to 64 bits). It seemed inappropriate to
add options for individual targets here when adding them globally does
not do any harm), but it could of course be done.

I know what your answer will be to the following, but it's really
becoming a pain to try to help solve issues with the compiler when all
you get back is complaints that this and that and a third rule isn't
being fulfilled. I got complaints before stating that I didn't run the
testsuites. I'm running them now. I got complaints that I just built
(not bootstrapped) the compiler. I'm bootstrapping it now. I got
complaints that I'm not diff-ing against the mainline. I'm doing so now.
I got complaints that I didn't write ChangeLog entries. I'm writing them
now. I maybe got other complaints I don't even recall at the moment (I
tried to avoid one by now also building at least all default languages).
No-one seems to care that all these rules require an awful lot of time
(bootstrapping the compiler takes hours, the testsuite runs take hours,
using the mainline is wasted time to me and my employer since we
obviously can't/don't want to use this for general consumption, so
importance to us have only changes on top of a released compiler), and
that instead of doing useful work I'm spending days on fulfilling just
these rules (this might be less extreme if I worked on just a single fix
or a couple of them, but over the last two or three years, prior to
having an FSF copyright assignment, a couple of dozen changes have piled
up and I'd really like to get them out rather than dropping them and
later running into the same problem again). As said above (and as got to
hear previously), everyone's (supposedly) playing by these rules.
Whether everyone's pleased by them doesn't matter. Whether this severly
limits productivity doesn't matter either.

Jan

>>> "Joseph S. Myers" <jsm@polyomino.org.uk> 07.07.04 14:07:45 >>>
On Wed, 7 Jul 2004, Jan Beulich wrote:

> 2004-07-07 Jan Beulich <jbeulich@novell.com>
> 
> 	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(<n>) becomes
> identical
> 	to #pragma pack(push, <n>).
> 	* 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]