Re: Access to enum definition at run time

Yair Lenga via Gcc <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <CAK3_KpOada7Dv1Eg7=jS_KVBumae64ZbMJV_jeS1q9X-3usw5w@mail.gmail.com>
Jakub,

Thanks for taking the time.
My focus is on the C compiler. Assuming the enum "metadata" is stored
in a structure/variables that are readable by the program - can C
programs access it ? Does it apply to "C" enums, or only to "C++" enum
classes.

Yair

On Thu, Apr 30, 2026 at 2:28 PM Jakub Jelinek <[email protected]> wrote:
>
> On Thu, Apr 30, 2026 at 02:08:33PM +0300, Yair Lenga via Gcc wrote:
> > Looking for any feedback about the
> > 1, Idea/concept.
> > 2. The implementation of the pugin (Github URL)
> > 3. Is there a path for making it an experimental/official GCC
> > extension? (after cleanup, reviews, adding test cases/, etc.)
>
> I don't think we have a repository of GCC plugins (except some plugins
> in the testsuite, gcc.dg/plugin/ and g++.dg/plugin/ ).
>
> BTW, in C++26 one doesn't need a plugin for such things, in a few lines
> it can be written using C++26 reflection.
>
>         Jakub
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.