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]
Other format: [Raw text]

Re: Preparsing sprintf format strings


rridge@csclub.uwaterloo.ca (Ross Ridge) writes:
> I don't think that's true, but regardless many systems have runtime
> character sets that are dependent on locale.  If GCC doesn't support this,
> then GCC is broken.

Geoffrey Keating writes:
> I don't think it's unreasonable to insist that you tell the compiler a
> character set that matches the one you are using at execution time for
> string literals.

It's completely unreasonable.  I should be able put whatever byte values
I want into strings literal, using octal and hexidecimal escapes if
necessary, regardless of what locale might be at runtime or what GCC
thinks the execution character set is.  It would be absurd for code like
like fprintf(f, "\xFF\xFF"); to be undefined only because GCC thinks the
execution character set is UTF-8 or ASCII. 

					Ross Ridge


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