Hello, Alexandre!

> Instead of 0x4142, use (('A'<<8)|'B').

Some compilers may disallow initializing arrays with such expressions.

> But then, if the encoding of the host platform is different from that
> of the build platform, the test would fail.

Really? I don't think such a compiler would produce working programs. If
the compiler puts "Hello, World\n" in the encoding for the build platform
into the object file the resulting executable will print garbage.

If is often excusable that floating point is not supported properly in
cross-compilers, but this shouldn't apply to strings and characters. C
compiler that cannot compile hello.c is not a C compiler.

Regards,
Pavel Roskin

Reply via email to