This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GTY as attributes
- From: Tom Tromey <tromey at redhat dot com>
- To: Taras Glek <tglek at mozilla dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 25 Feb 2008 12:45:11 -0700
- Subject: Re: GTY as attributes
- References: <47BF712B.4050201@mozilla.com>
- Reply-to: tromey at redhat dot com
>>>>> "Taras" == Taras Glek <tglek@mozilla.com> writes:
Taras> typedef struct Name GTY(()) {
Taras> };
Taras> These would parse fine as attributes if they were more like
Taras> typedef struct GTY(()) Name {
Taras> };
Taras> Would you be willing to accept such a change?
I couldn't approve or reject a patch to do this, but I think the
precise syntax of GTY's does not matter much provided that nothing
regresses -- i.e., gengtype works, the docs are updated, etc.
If you wrote a patch to do this, I would support it.
If you do decided to do this, you might want to get started on your
GCC paperwork early, before the patch is finished.
Taras> Another possible benefit of raising GTYs to attribute status would be
Taras> that other projects could do compile-time reflection similar to what
Taras> GCC does in a semi-formal way.
I don't think we want to expose GTY stuff outside of GCC.
Instead I think other project should use something like dehydra or
gcc-xml or whatever to extract whatever metadata they need. AIUI the
reason we didn't do this for gengtype is just that we needed to
support building with other compilers.
Tom