This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
offering a full implementation of C99 compound initializers traversal
- From: "Daniel S. Wilkerson" <dsw at cs dot berkeley dot edu>
- To: gcc at gnu dot org
- Date: Fri, 09 Jan 2004 19:15:02 -0800
- Subject: offering a full implementation of C99 compound initializers traversal
- Organization: University of California at Berkeley, Computer Science Division
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/