This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 18785: alternative patch
- From: Roger Sayle <roger at eyesopen dot com>
- To: Geoffrey Keating <geoffk at geoffk dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: Mon, 14 Feb 2005 18:56:27 -0700 (MST)
- Subject: Re: PR 18785: alternative patch
On 14 Feb 2005, Geoffrey Keating wrote:
> What I'd do is, like Roger, build up a global table (not a 'huge'
> table, one that contains 256 1-byte entries) that maps between the
> required part of the host and target character sets. However, like
> Zack, I would never have special 'outs' for the case where
> host==target; I would always use the table.
The "outs" in my patch were not really by design, but a side-effect
(design choice?) of avoiding initializing this table in the java,
gfortran and ada front-ends. If we could guarantee the table was
always initialized, one wouldn't need my nonnative_charset_p flag.
During stage3, and without global write, I wasn't keen on modifying
more of the compiler than required to address the regression, and
touching libcpp or the front-ends would have taken more than a month
or two to get reviewed. However, Zack's approach of using a langhook,
would avoid this problem, and provide the foundations of the
"best-of-both-worlds" hybrid that you propose.
Fortunately, such a refinement/optimization can now be considered
(without time pressures) for 4.1, now that the middle-end regression
has been fixed for 4.0.
Roger
--