This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gdb and g77
- To: amylaar at cygnus dot co dot uk
- Subject: Re: gdb and g77
- From: craig at jcb-sc dot com
- Date: 14 Jun 1999 23:12:16 -0000
- Cc: andy at eas dot asu dot edu, egcs at egcs dot cygnus dot com
- Cc: craig at jcb-sc dot com
- References: <199906141901.UAA17116@phal.cygnus.co.uk>
>> (Yes, it is a "C-ish" back end, but it does have a higher-level array
>> facility than C itself does, insofar that C cannot represent arrays
>> of arrays -- instead, it represents arrays of pointers to arrays, for
>> example.)
>
>Huh? C can represent arrays of arrays just fine.
That's news to me. Care to show how? Note I said *represent* -- not
*implement* -- as any language that provides single-dimensional arrays
can be used to *implement* multi-dimensional arrays.
So, basically, what I'm asking is, what is the C notation that denotes
the equivalent to Fortran's
REAL A(5,6)
(except that it's row-major, of course) *including* the fact that the
storage takes up 30 units of memory *and* the fact that the same array
declaration works just fine regardless of whether A is a local variable,
in common (external) storage, or a dummy argument (the last case being
especially notable)?
Reason I ask is, in the past, C programmers have occasionally taken
to comp.lang.fortran showing how "easy" it is to cons up a set of
preprocessor macros to make C *look* like it has multi-dimensional arrays
a la Fortran. I'm sure they'd be quite surprised to learn that C
had them all along!
tq vm, (burley)