This is the mail archive of the gcc@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]

Re: revised proposal for GCC and non-Ascii source files


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.



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