This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Support for Pascal strings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]