This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: revised proposal for GCC and non-Ascii source files
- To: eggert at twinsun dot com
- Subject: Re: revised proposal for GCC and non-Ascii source files
- From: Richard Stallman <rms at gnu dot org>
- Date: Wed, 30 Dec 1998 08:24:40 -0500
- CC: zack at rabi dot columbia dot edu, bothner at cygnus dot com, amylaar at cygnus dot co dot uk, martin at mira dot isdn dot cs dot tu-berlin dot de, gcc2 at gnu dot org, egcs at cygnus dot com
- References: <199812290158.RAA12839@shade.twinsun.com>
- Reply-to: rms at gnu dot org
Your proposal seems pretty good, but it's missing one very important
feature. That is the warning if the locale has an effect on the
result and was not explicitly specified. That warning is very
important. Depending on the environment is unreliable, so we need to
discourage people from doing that *before* they learn the hard way.
Your arguments about "#pragma charset" are based on obscure ways of
using such a construct. That is letting the tail wag the dog.
Instead why not just clip off the tail?
If a _Pragma ("charset FOO") directive is in the expansion of a
macro,
Solution A: use #charset rather than #pragma charset.
Then the issue of _Pragma does not even arise.
Solution B: use #pragma charset but don't allow _Pragma ("charset FOO").
A similar
problem would occur if a charset pragma is in an ignored section
of text
We could simply forbid this usage and say that #charset must be used
at the beginning of the file only. Nothing but whitespace (including
comments) should be allowed preceding #charset.