Xref: utzoo gnu.gcc:280 comp.os.vms:12750 comp.lang.c:17059 Path: utzoo!attcan!uunet!mcvax!kth!osiris!uplog!lynx!zyx!arndt From: arndt@ZYX.SE (Arndt Jonasson) Newsgroups: gnu.gcc,comp.os.vms,comp.lang.c Subject: Re: Problems with GCC and/or VAX LINK Keywords: globalref, extern, quotation marks Message-ID: <4603@zyx.ZYX.SE> Date: 13 Mar 89 10:17:28 GMT References: <1680@levels.sait.edu.au> <1153@auspex.UUCP> <9776@bloom-beacon.MIT.EDU> Reply-To: arndt@zyx.ZYX.SE (Arndt Jonasson) Organization: ZYX Sweden AB, Stockholm, Sweden Lines: 24 In article <9776@bloom-beacon.MIT.EDU> jfc@athena.mit.edu (John F Carr) writes: >> 3.1.9 Comments >> ... The contents of a comment are examined only to identify >> multibyte characters ... ^^^^^^^^^^^ > ^^^^^^^^^^^^^^^^^^^ > >Why? So that the sequence '/' '*' isn't mistaken for the end of the comment if it should occur "out of phase", so to speak. If there are multibyte characters in the comment (the usual scheme I am aware of is to let the first byte of a multi-byte character have its high bit set), the character '/' might occur as the second component of such a character. Then, if the next character happens to be an ordinary one-byte '*', you will appear to have reached an end-of-comment, unless you keep track of multi-byte characters. All this amounts to in practice (at least for the purpose of parsing comments) is to use a slightly more sophisticated character reader, which always returns a multi-byte character, with the usual mono-byte characters as a special case. -- Arndt Jonasson, ZYX Sweden AB, Styrmansgatan 6, 114 54 Stockholm, Sweden email address: arndt@zyx.SE or !mcvax!enea!zyx!arndt