Bogus warning from AIX XL C Compiler/6000?

Ronald S. Woan ron at woan
Tue Aug 28 00:59:24 AEST 1990


In article <1990Aug24.234147.9710 at agate.berkeley.edu>,
lindahl at violet.berkeley.edu (Ken Lindahl   642-0866) writes:
Ken> Nit: I think a "very good warning message" should be more
Ken> accurate, e.g.: (W) Undefined escape sequence '\x'. Replaced by
Ken> 'x'.

Agreed that this would have been a better error message, but I don't
think that it is doable with the NLS messages because the warning
message gets taken directly from the database so it doesn't seem to me
that the 'x' specifics can be easily included. Let me point out that
the warning was give pointing at the '\' though it isn't excatly clear
that the 'x' wouldn't be ignored, as well from the message. Perhaps
'\' ignored would have been the best choice for a warning.

Ken> More importantly, this and an earlier posting referred to the
Ken> '\xNN' escape sequence, where NN is a hex number indexing the
Ken> ASCII character set.  It seems to me that this should only apply
Ken> to the situation where the '\x' is followed by at least one
Ken> character from the set [0123456789ABCDEF].  That is, '\x' should
Ken> be treated like any other undefined, non-hex escape sequence.
Ken> (Note this is exactly what the compiler has done. I'm not taking
Ken> issue with the compiler, but with the two postings.) If you try
Ken> to interpret '\x' as a hex escape, the only reasonable (?)
Ken> interpretation is '\x00' and the compiler should insert a NUL
Ken> character. This is not a recommendation on my part.

Reread my quote from the book and you'll find that behavior of '\x'
and other undefined sequences is undefined in the ANSI standard...
Anyway, a reasonable compiler (i.e.  xlc) will go back to just
ignoring the '\' to keep from breaking old code.

+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan           woan at peyote.cactus.org or woan at soda.berkeley.edu +
+ other email addresses             Prodigy: XTCR74A Compuserve: 73530,2537 +



More information about the Comp.unix.aix mailing list