This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Let's kill specs, completely rewrite gcc.c
- To: Neil Booth <neilb at earthling dot net>
- Subject: Re: [RFC] Let's kill specs, completely rewrite gcc.c
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sun, 7 Jan 2001 20:20:42 +0000 (GMT)
- cc: <gcc at gcc dot gnu dot org>, "Chris G . Demetriou" <cgd at sibyte dot com>
On Sun, 7 Jan 2001, Neil Booth wrote:
> > I presume this would fix the problem
> > <URL:http://gcc.gnu.org/ml/gcc-bugs/2000-11/msg00545.html> that
> > -funsigned-char -fsigned-char defines __CHAR_UNSIGNED__ but has
> > signed char, which seems fairly intrinsic to the current specs
> > scheme.
>
> Maybe - I'm not familiar with that. Specs aren't good at applying
> logic, since they don't have the flexibility of a programming
> language. Hence why I want to do it in C via hooks :-)
The right way to handle this sort of thing is probably for the front end
to pass the definition of __CHAR_UNSIGNED__, or not, to cpplib, after
parsing its options but before preprocessing begins, depending on the
value of flag_signed_char, rather than using specs. However, this causes
problems when the cpp0 executable gets used - it would probably require
cc1 to handle -E / -save-temps (i.e., producing preprocessor output in
text form) itself.
--
Joseph S. Myers
jsm28@cam.ac.uk