This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Support for Pascal strings
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: PATCH: Support for Pascal strings
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Fri, 15 Jun 2001 23:34:00 -0400
- Cc: Neil Booth <neil at daikokuya dot demon dot co dot uk>, Ziemowit Laski <zlaski at apple dot com>, gcc-patches at gcc dot gnu dot org
- References: <20010616010310.C450@daikokuya.demon.co.uk> <3B2AABD1.1C665592@apple.com>
On Fri, Jun 15, 2001 at 05:44:01PM -0700, Stan Shebs wrote:
> Neil Booth wrote:
> >
> > Ziemowit Laski wrote:-
> >
> > > I would humbly like to propose to add support for Pascal-style
> > > string literals in gcc.
> >
> > I'm not in favour of adding more stuff to CPP to support non-C
> > languages.
>
> The main purpose of this is to support calling Pascal functions
> from C. The Pascal function will expect the string it receives to
> already have a length byte on the front of it. The standard
> leaves \<char>, for most chars, available for extensions, and \p
> has been in use to designate the Pascal length byte since sometime
> in the mid-80s.
Note, any future version of the patch must issue the appropriate diagnostic if
-pedantic is used. The \p character violates C99's section 6.11.2 (6.9.2 in
C89), which explicitly reserves \ followed by a lowercase letter that isn't
defined by the standard is explicitly reservered for future versions of the
standard.
--
Michael Meissner, Red Hat, Inc. (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482