bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile error in current CVS, src/server.c:5500


From: Derek Robert Price
Subject: Re: Compile error in current CVS, src/server.c:5500
Date: Mon, 21 Jul 2003 14:28:12 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1


Mark D. Baushke wrote:

Derek Robert Price <derek@ximbiot.com> writes:
Do you know when split strings began being supported? C89?

Yup.

There was much contention and debate during drafts of the ANSI C
standard, but I am fairly sure that ANSI/ISO 9899-1990 (aka C89) is the
first one to force the behavior (section 6.1.4 "String Literals").

Where the grammer is

 Syntax:
   string-literal
        "s-char-sequence[opt]"
        L"S-char-sequence[opt]"
   s-char-sequence:
        s-char
        s-char-sequence s-char
   s-char
        any member of the source character set except
            the doulbe quote ("), backslash (\), or new-line character
        escape-sequence

So you will note that the new-line character has never actually been
a formal part of the string-literal without being escaped. It is only
in recent compilers that this is being enforced.

In ISO/IEC-9899-1999 (aka C99), the same syntax is provided (but it is
now in section 6.4.5 String Literals). The only real change is that the
text of the description and semantics has been expanded for
clarification and the single-quote clarified as having two
representations (either "'" or "\'").


This doesn't seem to specify the:

   "some text\n"
   "some more text "
   "even more text\n"

style strings. Do you know if that is supported C89+? Or should we be sticking with the ugly:

   "some text\n\
some more text even more text\n"

style strings?

Derek

--
               *8^)

Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!
--
The principal's toupee is not a Frisbee.
The principal's toupee is not a Frisbee.
The principal's toupee is not a Frisbee...

         - Bart Simpson on chalkboard, _The Simpsons_






reply via email to

[Prev in Thread] Current Thread [Next in Thread]