Preparsing sprintf format strings
Ross Ridge
rridge@csclub.uwaterloo.ca
Fri Oct 12 22:04:00 GMT 2007
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
More information about the Gcc
mailing list