Message ID | CAGWvnykzKRL=u-X1X5wbU_o2v6aEbp17veePgWWQbwQohkcv9w@mail.gmail.com |
---|---|
State | New |
Headers | show |
Another suggestion from Segher is "_F.", which is both reserve and cannot conflict with C/C++ because identifiers cannot contain ".". - David
On Oct 3, 2012, at 4:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote: > Another suggestion from Segher is "_F.", which is both reserve and > cannot conflict with C/C++ because identifiers cannot contain ".". The problem with that are machines that don't like "." in identifiers (aka NO_DOT_IN_LABEL)… so one just has to be a little careful in using it.
On Wed, Oct 3, 2012 at 8:29 PM, Mike Stump <mikestump@comcast.net> wrote: > On Oct 3, 2012, at 4:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote: >> Another suggestion from Segher is "_F.", which is both reserve and >> cannot conflict with C/C++ because identifiers cannot contain ".". > > The problem with that are machines that don't like "." in identifiers (aka NO_DOT_IN_LABEL)… so one just has to be a little careful in using it. That's a good reason to use "_F". And NO_DOT_IN_LABEL systems will not function with the current "." mangling. - David
Index: trans-decl.c =================================================================== --- trans-decl.c (revision 192019) +++ trans-decl.c (working copy) @@ -1097,9 +1097,9 @@ /* Also prefix the mangled name. */ if (sym->module) - name = gfc_get_string (".__%s_MOD_%s", sym->module, sym->name); + name = gfc_get_string ("_F_%s_MOD_%s", sym->module, sym->name); else - name = gfc_get_string (".%s", sym->name); + name = gfc_get_string ("_F_%s", sym->name); length = build_decl (input_location, VAR_DECL, get_identifier (name),