Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!d75!woan!ron From: ron@woan (Ronald S. Woan) Newsgroups: comp.unix.aix Subject: Re: Bogus warning from AIX XL C Compiler/6000? Keywords: correct under ANSI definition Message-ID: <3299@d75.UUCP> Date: 27 Aug 90 14:59:24 GMT References: <1990Aug23.034343.11444@murdoch.acc.Virginia.EDU> <3239@awdprime.UUCP> <1990Aug24.234147.9710@agate.berkeley.edu> Sender: news@d75.UUCP Reply-To: woan@soda.berkeley.edu Organization: Austin School of Hardknocks Lines: 36 In article <1990Aug24.234147.9710@agate.berkeley.edu>, lindahl@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@peyote.cactus.org or woan@soda.berkeley.edu + + other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +