This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Fortran inquire statement mask


On Feb 19, 2006, at 17:11:00, FX Coudert wrote:

Hi all,

Since Jakub's patch remodeling the I/O system (for thread-safety), each library call is issued with a structure of arguments, and a mask to indicate which arguments are present (roughly speaking). But the type for this mask is an "unsigned int" and I expect this to be not enough in the very near feature: I'm currently implementing F2003 stream access, and that requires a few more arguments to INQUIRE, for example, which makes it up to 1 << 33 (which is too much).

So, I guess there is no real downside to changing the mask type into an "unsigned long int", but that leaves a remaining question: what do we do on the 4.1 branch? It seems to me that, if 4.1.0 is shipped with a "unsigned int" mask, we'll have to come to disgusting hacks to change that in the future 4.1.x releases.

Any ideas, opinions?

Does this mask provide any advantages? Presumably, this structure could be filled in with the default values at compile time, so that one only has to set very few entries at run time. If one uses one such structure per I/O call, then the caller knows that the default values are never changed.


The I/O library, on the other hand, has to test anyway which elements are "present" in the structure. Currently it tests a flag, and if the flag is set, accesses the structure element. It could instead just look at the structure element. That would not be more expensive.

-erik

--
Erik Schnetter <schnetter@cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



Attachment: PGP.sig
Description: This is a digitally signed message part


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