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: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Subject: Re: PATCH: Support for Pascal strings
- From: Ziemowit Laski <zlaski at apple dot com>
- Date: Fri, 15 Jun 2001 17:22:23 -0700
- Cc: gcc-patches at gcc dot gnu dot org
Thanks for the quick response,
On Friday, June 15, 2001, at 05:03 , Neil Booth wrote:
> Also, your patch introduces a global variable to cpplib. This is not
> acceptable - cpplib is reentrant.
Ok, thanks -- will fix this.
> I also don't like passing a pointer to an int to
> cpp_interpret_charconst: passing a boolean indicating whether \p is
> acceptable appears much cleaner.
I guess you mean 'cpp_parse_escape', right? The 'int *pascal_p'
parameter
is an output parameter -- cpp_parse_escape sets the int to 1 if it sees
an \p. It definitely *is* kludgy. :) Another hack would be to choose
some
very large unsigned int value -- say, ((unsigned int)-10) -- and have
cpp_parse_escape return that as the character seen instead. What do you
think?
--Zem
--------------------------------------------------------------
Ziemowit Laski Apple Computer, Inc.
zlaski@apple.com 2 Infinite Loop, MS 302-4SN
+1.408.974.6229 Fax .1344 Cupertino, CA 95014-2085