This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: what are exactly GCC core types?


Basile Starynkevitch <basile@starynkevitch.net> writes:

> What are exactly GCC code types, defined in gcc/coretypes.h?

They are types for which there was no obvious place to put them.

> Of course, they are very important types used in GCC. And there are
> probably wired in gengtype (but maybe not all of them; I didn't check
> for all; certainly gengtype handle tree & gimple specially in some
> way.).

gengtype only handles a few types specially.  There is no particular
connection between types recognized by gengtype and coretypes.h.
E.g., gengtype handles VEC specially, but it is not in coretypes.h.

> However, I don't understand why gimple_seq_node is a core type. It seems
> rarely used (outside of gimple*.[ch] files), and I would imagine it
> could be kept in gimple.h.

I agree.  I expect it's there just because gimple_seq is there.

> I also don't understand why 
>   union section;
>   typedef union section section;
>   struct cl_target_option;
>   struct cl_optimization;
> should be kept in gcc/coretypes.h

I don't know either.

> I could imagine that the transition to C++ might have to C++-ify these
> core types (all of gcc/coretypes.h) very quickly, or on the contrary to
> keep them as they are, without making a class of them, for a long time.

I don't think the transition to C++ will have to change any of these
types.  We should not make it a goal to convert all types to classes.

> Do we have a clear criterium to add, keep, or remove a type from
> gcc/coretypes.h?

No.

Ian


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