public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* offering a full implementation of C99 compound initializers traversal
@ 2004-01-10  3:15 Daniel S. Wilkerson
  2004-01-13  1:35 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel S. Wilkerson @ 2004-01-10  3:15 UTC (permalink / raw)
  To: gcc

I have done a full implementation of the semantics of C99 compound
initializers; that is, simultaneously iterating over the target types
and the initializer expressions and pairing them up correctly.  We are
pretty confident that it is correct, since we also have an Ocaml
implementation and the two have been tested against each other on some
pretty horrible examples.

I did this for my own use, but factored it out for use by another
project here at Berkeley as well.  Since it is factored out for use by
two different projects with different abstract syntax trees, my classes
are designed so that you can incorporate them into your class hierarchy
without too much difficulty.  For example, even an up-cast is done
through a method so that those classes don't have to have the same
inheritance relationship in your hierarchy.

Given how complex this is (to me anyway) and the fact that the version
of g++ that I have doesn't seem to do them fully, I thought perhaps I
would offer it to you in case you haven't gotten around to it.  I could
release it under the BSD license.  Would this be of any use to the g++
team?

Daniel Wilkerson
http://www.cs.berkeley.edu/~dsw/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: offering a full implementation of C99 compound initializers traversal
  2004-01-10  3:15 offering a full implementation of C99 compound initializers traversal Daniel S. Wilkerson
@ 2004-01-13  1:35 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2004-01-13  1:35 UTC (permalink / raw)
  To: Daniel S. Wilkerson; +Cc: gcc

Daniel S. Wilkerson wrote:
> I have done a full implementation of the semantics of C99 compound
> initializers
> Given how complex this is (to me anyway) and the fact that the version
> of g++ that I have doesn't seem to do them fully

It isn't clear what you are offering.  I don't see the term "compound 
initializer" in the C99 standard.  We need a better explanation of what 
feature you are talking about.  Incomplete initializers?  Initializers 
with designators?

I also don't understand why you mention g++.  g++ follows the C++ 
language standard, not the C language standard.  Are you asking for us 
to extend the C++ language to include a feature present in the C99 
standard?  That is a rather different situation from offering a patch 
for a C++ language feature we haven't implemented yet.  Others may not 
agree that extending the C++ language in this manner is appropriate.

You also didn't mention what version of g++ you have.  If you have an 
old version, and you are asking about a standard language feature, then 
it could have been implemented already.

We aren't going to accept a patch in the C++ front end unless the patch 
is GPLed, and the copyright is assigned to the FSF.  That is standard 
policy for GCC patches.  A modified BSD license (without the advertising 
clause) would not be acceptable for something like this.  It might be OK 
for a library, but not for code in a language front end.

If the feature you are taking about is already implemented in the C 
front end, then we may not need new code, we might be able to reuse code 
that already exists in the C front end.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-13  1:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-10  3:15 offering a full implementation of C99 compound initializers traversal Daniel S. Wilkerson
2004-01-13  1:35 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).