This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Interoperability of Fortran array and C vector?
- From: Tobias Schlüter <Tobias dot Schlueter at physik dot uni-muenchen dot de>
- To: Sa Liu <SALIU at de dot ibm dot com>
- Cc: FX Coudert <fxcoudert at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>, GCC Development <gcc at gcc dot gnu dot org>, Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Date: Wed, 05 Mar 2008 13:47:30 +0100
- Subject: Re: Interoperability of Fortran array and C vector?
- References: <339c37f20803040422y515b504aucd56d16520e8ca2e@mail.gmail.com> <OF47E8DB85.6CE75F08-ONC1257402.0045FAB7-C1257402.004BC152@de.ibm.com> <47B7DF58-8DBB-491E-B36E-4BCB6B98CBEA@gmail.com> <OFDFA7E186.86D6DE3B-ONC1257403.003FDAB1-C1257403.00437A09@de.ibm.com>
Sa Liu wrote:
I noticed that in fortran/convert.c the convert() function calls
convert_to_vector() if the target type is VECTOR_TYPE. When is that
function triggered in Fortran frontend? Since Fortran language doesn't
support vector type, why does it convert something to a vector expression?
At the top it says:
/* This file contains the functions for converting C expressions
to different data types. The only entry point is `convert'.
Every language front end must have a `convert' function
but what kind of conversions it does will depend on the language. */
/* copied from the f77 frontend I think */
/* copied from c-convert.c without significant modification*/
I don't think this file has ever been modified in any non-mechanical
way. So I'd assume that its contents are historical / accidental.
Cheers,
- Tobi
--
Tobias Schlüter
Am Coulombwall 1, Zi. 326
85748 Garching b. München
Tel.: +49/89/289-14139