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: thoughts on martin's proposed patch for GCC and UTF-8


    The committee is also requiring _Pragma("FOO") to have the same
    meaning as #pragma FOO.  _Pragma("FOO") can be output by macros.
    Does this overcome your objection to pragmas?

Yes.  I am still not convinced that we should use #pragma for this
particular job, but _Pragma certainly solves that problem for pragmas
in general.

	    GCC currently doesn't have directives like this:

	    #character-set ASCII
	    #character-set EBCDIC

	    because they're not needed

GCC does not have any way to specify ASCII vs EBCDIC at run time.
The choice of ASCII vs EBCDIC is fixed, given your host platform.
So it does not shed any light on the question at hand.

    No, it doesn't avoid the danger.  You can specify the wrong locale
    just as easily, if not more easily, with #locale -- e.g. see the
    transliteration scenario in my longer answer above.

ANY method of specifying the locale leaves a chance you get it wrong
when you CHANGE the locale.  But at that time, you will be on the
alert for having made a mistake in operating on the file.

Using an environment variable makes lossage possible any time, if you
changed your environment for some reason--even when the same file
worked correctly yesterday and you have not changed it in weeks.

We cannot get rid of the former problem, so we have to accept it.
But we can get rid of the latter problem, and we should.



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