public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/38839]  New: BIND(C): Allow non-digit/underscore/alphabetic binding names
Date: Wed, 14 Jan 2009 15:37:00 -0000	[thread overview]
Message-ID: <bug-38839-13404@http.gcc.gnu.org/bugzilla/> (raw)

Motivated by
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/d977a668b0316119

Currently, BIND(C, NAME=binding-name)  checks for ISALPHA and "_". However, the
C standard allows more (from ISO/IEC 9899:1999(E) = C99, Section 6.4.2
Indentifiers):

identifier:
   identifier-nondigit
   identifier   identifier-nondigit
   identifier   digit

identifier-nondigit:
   nondigit
   universal-character-name  <<<<<<<<
   other implementation-defined characters  <<<<<<

nondigit: One of
   _ a b c (...) z A B C (...) Z

digit:
  0 1 (...) 9


Note the items marked by "<<<<<". I'm not sure whether the current restriction
makes any problem in practice, but I could imaging that there is a legitimated
use for it, though I could not find a good example.

Currently, it is abused to call STDCALL programs which get a "@<n>" appended to
the name where "<n>" is related to how much needs to be popped from the stack.
The proper solution is to support STDCALL (PR 34112); thus I don't think this
is a proper use.

Does it make sense to change the error into a warning? Or to allow certain
other characters?

 * * *

Seemingly $ is allowed by "gcc -c -std=c99 -Wall -pedantic":

void t$FAst(void)
{
}


-- 
           Summary: BIND(C): Allow non-digit/underscore/alphabetic binding
                    names
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38839


             reply	other threads:[~2009-01-14 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 15:37 burnus at gcc dot gnu dot org [this message]
2009-01-14 16:01 ` [Bug fortran/38839] " burnus at gcc dot gnu dot org
2009-01-14 16:09 ` burnus at gcc dot gnu dot org
2009-03-29  8:46 ` fxcoudert at gcc dot gnu dot org
2009-12-10 19:11 ` dfranke at gcc dot gnu dot org
2009-12-10 19:52 ` burnus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-38839-13404@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).