This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fdump-ast-original and strg:
- From: mike stump <mrs at windriver dot com>
- To: rth at redhat dot com, zack at codesourcery dot com
- Cc: florian at edamail dot fishkill dot ibm dot com, gcc at gcc dot gnu dot org, guillaume dot thouvenin at polymtl dot ca, jbuck at synopsys dot COM
- Date: Fri, 30 Nov 2001 17:47:08 -0800 (PST)
- Subject: Re: fdump-ast-original and strg:
> Date: Fri, 30 Nov 2001 15:48:09 -0800
> From: Richard Henderson <rth@redhat.com>
> To: Zack Weinberg <zack@codesourcery.com>
> On Fri, Nov 30, 2001 at 03:37:43PM -0800, Zack Weinberg wrote:
> > > Unfortunately there is no such function. That stuff is
> > > replicated 99 times in various header files.
> >
> > Dare I ask why?
> Historic acretion.
All the things that the ports have most in common ought to available
for default to all ports, and all ports that have those default ought
not to have their own, further, these things should be documented in
the manual. This will simplify lots of ports, and regularize the
ports, making them all easier to read and understand.
defaults.h was created to meet this need, people should collapse
common things into it as part of normal maintenance.
To pick a few (that easily fit on one line):
23 #define BITS_PER_WORD 32
6 #define BITS_PER_WORD 16
5 #define BITS_PER_WORD 64
4 #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32)
1 #define BITS_PER_WORD 8
21 #define SHORT_TYPE_SIZE 16
1 #define SHORT_TYPE_SIZE 32
1 #define SHORT_TYPE_SIZE (INT_TYPE_SIZE == 8 ? INT_TYPE_SIZE : 16)
9 #define CHAR_TYPE_SIZE 8
2 #define CHAR_TYPE_SIZE BITS_PER_UNIT
2 #define CHAR_TYPE_SIZE 16
18 #define INT_TYPE_SIZE 32
3 #define INT_TYPE_SIZE 16
2 #define INT_TYPE_SIZE (TARGET_SHORT ? 16 : 32)
1 #define INT_TYPE_SIZE 64
A while ago, I complained about TARGET_VT and friends. It seemed
kinda pointless, and I noticed that now, thanks to the hard work of
Neil, they are all in defaults.h, with the sole exception of an EBCDIC
machine. :-) So, sometimes things do get better.