(j3.2006) (SC22WG5.4779) [ukfortran] [WG5 letter ballot 4 on Fortran 2008 interpretations]
Van Snyder
van.snyder
Sat Sep 15 18:25:23 EDT 2012
N.M. Maclaren wrote:
> This is merely a remark on a response, not a response.
>
> On Sep 15 2012, Van Snyder wrote:
>>
>> -C- --- F08/0057 Interoperability with empty types
>>
>> Does this need a compatibility caveat in 1.6?
>
> I doubt it. While empty structures are allowed in C++, including in its
> C mode, and they are allowed as an extension in gcc and Intel C, it IS
> explicitly and clearly illegal in C and has not been added even to C11.
> Despite the statement in the question, it is neither a syntax error nor
> a constraint in C - it is merely forbidden, and so can be extended
> without needing a warning - but compatibility caveats for
> interoperability
> with extended C languages does seem to be going a bit far.
Just because one declares a type with the BIND(C) attribute, and creates
objects of that type, doesn't mean they are actually ever used for
interoperation. Bizarre, yes, but permitted by the standard -- until
this interp. Compatibility caveats in 1.6 are for compatibility with
earlier Fortran standards, not for interoperability. "We allowed this
in Fortran 2003, but not any more."
More information about the J3
mailing list