https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90329
--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #6) > (In reply to Janne Blomqvist from comment #5) > > (In reply to Thomas Koenig from comment #4) > > > Currently, I am leaning towards using an option with a mandatory > > > warning (no way to turn it off) which does not push any string lenghts > > > onto the stack at all, something like -fbroken-character-abi, > > > which we would use for external procedures without an explicit interface. > > > > Hmm, wouldn't this completely break procedures with "character(len=*)" dummy > > arguments? > > Yes :-( > > This would be more or less equivalent to a -fbind-c flag. > > >Or did mean that it would be used only for length=1 strings? > > Unfortunately, the callee does not know the string length > passed by the caller. > > > > I can also extend -fc-prototypes so that it also issues prototypes > > > for any global procedures outside of BIND(C), or add a new option. > > > > This might be useful. > > I just noticed that -fc-prototypes does not issue a prototype > for a global BIND(C) procedure. I'll probably fix that one soon. Just for the record, I have long since thought that passing the string length as a hidden argument is a design error just as awkward of the poor array descriptor design. We should be passing the data field of a descriptor as the address of the string, so that there is a known offset to the string length. This could be a generalised improvement, since it could also be used in general for f77 argument passing and would allow us to get rid in the initialisation and hidden descriptors nonsense in dummy handling. Storing all entities as descriptors would eliminate huge quantities of code in trans-*.c :-) Dream on, Paul.... Maybe for 11-branch? Paul