This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Adding UNION/MAP -- Feedback and tips pls!


> I have to confess that my first reaction was that we shouldn't be
> doing STRUCTURE/UNION at all.

We certainly shouldn't be doing STRUCTURE. This is really just the
same as TYPE in standard Fortran.

However, UNION looks like a reasonable extension to me (which has no
direct replacement in standard Fortran - unless you count
EQUIVALENCE). I also think we should only support the standard '%' as
a component selector (also with unions).


> However, I would be content if it lived
> behind an option.

Under the above circumstances, I don't really see a problem with
enabling it by default (i.e. with -std=gnu) as we do for other
extensions.

But I'm also fine with with requiring "-funion" to enable it.

I guess one could even argue whether having -std=gnu by default is
reasonable at all, or whether the default shouldn't rather be
-std=f2008ts (possibly augmented by -fall-intrinsics) ...

Cheers,
Janus



> On 2 March 2013 09:15, N.M. Maclaren <nmm1@cam.ac.uk> wrote:
>> On Mar 2 2013, W Spector wrote:
>>>
>>>
>>> The "." to separate component names does conflict with Fortran-90s
>>> user-defined operator syntax.  Code should use "%" to be as unambiguous and
>>> as Standard-conforming as possible.  So I would also add my vote that, if it
>>> 'dot compatibility' implemented, it only be enabled via a compatibility
>>> option.
>>
>>
>> Speaking as another user, I doubt that there is any other plan.  I use
>> gfortran for teaching MPI and OpenMP, and would get very, very unhappy
>> if there were such an extreme aberration available by default.
>>
>>
>>> Should UNION/MAP itself also be enabled by a compatibility option?
>>> (Separate from a 'dot compatibility' option - if implemented?)
>>
>>
>> In my view, strongly "yes".  It's not just the usual GNU extension,
>> which are often considered for adding to the standard, but something
>> more like Cray pointers, which ARE enabled by an option.
>>
>>
>> Regards,
>> Nick Maclaren.
>>
>
>
>
> --
> The knack of flying is learning how to throw yourself at the ground and miss.
>        --Hitchhikers Guide to the Galaxy


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