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, 15 Jun 2001, Stan Shebs wrote:

> > I agree this extension is a mess and a bad idea.
> 
> Perhaps, but it's already been in use in the Mac world for about 15
> years or so, and there are millions of lines of code that use \p in
> strings.  I first implemented it in GCC in 1989 or so, so it's not
> even new for GCC.

Every extension poses a continuing maintenance burden on GCC maintainers 
and so needs compelling justification - for the extension and its design, 
considered afresh.  In this case you need to justify why the burden should 
fall on GCC maintainers rather than on Apple.  The extension seemed at 
first sight to be such a bad idea that the patch was not worth attempting 
to technically review, the sole redeeming feature being the presence of 
testcases.

In any case, it is necessary to show - and document - a clear
understanding of how the extension interacts with everything else in the
relevant language standards.  If you haven't read at least one of the
relevant standards, I think proposing extensions is ill-advised.  Points
to consider might be: how does this interact with multibyte characters?  
What array types, if any, can be initialised by one of these string
literals?  What is the type, both with and without -Wwrite-strings, and in
C++, and what conversions are such strings subject to in C++?  May these
strings be merged with other strings?  Are they NUL-terminated?  Is it a
constraint violation for the string to be too long?  Do you handle target
bytes wider than 8 bits?  In principle you should be able to propose
precise textual changes to the relevant language standards, with
rationale.

Can you provide any 1989 discussions from any previous submission of this
feature for GCC, showing whether it was rejected for technical or
political (FSF boycott of Apple) reasons?

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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