GNU Info

Info Node: (gcc-295.info)Subscripting

(gcc-295.info)Subscripting


Next: Pointer Arith Prev: Macro Varargs Up: C Extensions
Enter node , (file) or (file)node

Non-Lvalue Arrays May Have Subscripts
=====================================

   Subscripting is allowed on arrays that are not lvalues, even though
the unary `&' operator is not.  For example, this is valid in GNU C
though not valid in other C dialects:

     struct foo {int a[4];};
     
     struct foo f();
     
     bar (int index)
     {
       return f().a[index];
     }


automatically generated by info2www version 1.2.2.9