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: lto gimple types and debug info


Arnaud Charlet wrote:
In this same vein, I am very interested in using the gimple type
system as a way to start moving gcc from being a C compiler that
accommodates other languages to a compiler that handles different
languages on an equal footing. The freedom that C and C++ "enjoy" to
basically take a pointer to one type and convert it to a pointer to
almost any other type is not something that is allowed by the other
languages that gcc supports. Fortran seems to require (and this
should be confirmed by a fortran expert) a very disciplined use of
pointers, even restricting pointers to only being able to point to
variables that are declared to be targets of pointers.

I do not know Fortran, but from the description above, this is similar in Ada: you cannot freely mix different pointers, and you cannot make a pointer out of any variable, unless variables are marked 'aliased'. This semantic is already expressed today in GCC trees, so I'm not sure what more/different you're suggesting though.

Arno
I was more interested in the types rather that the variables and i was imprecise because I did not have access to good fortran information. The issue that i was trying to get to was that in c and c++ the types do really restrict what you can get to from a pointer, while in java they do. I suspect that in fortran they also do to but i do not know the language.

kenny


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