public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
       [not found] <bug-38839-4@http.gcc.gnu.org/bugzilla/>
@ 2014-06-08 22:37 ` fxcoudert at gcc dot gnu.org
  2014-06-29 14:15 ` fxcoudert at gcc dot gnu.org
  2014-06-29 14:16 ` fxcoudert at gcc dot gnu.org
  2 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-08 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |fxcoudert at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |fxcoudert at gcc dot gnu.org

--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Should be fixed at the same time as this patch here:
https://gcc.gnu.org/ml/fortran/2014-06/msg00090.html , which reworks the
parsing of binding labels. I intend to find what the consensus is on this
issue, incorporate it into the patch, and close this.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
       [not found] <bug-38839-4@http.gcc.gnu.org/bugzilla/>
  2014-06-08 22:37 ` [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names fxcoudert at gcc dot gnu.org
@ 2014-06-29 14:15 ` fxcoudert at gcc dot gnu.org
  2014-06-29 14:16 ` fxcoudert at gcc dot gnu.org
  2 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-29 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Author: fxcoudert
Date: Sun Jun 29 14:14:16 2014
New Revision: 212123

URL: https://gcc.gnu.org/viewcvs?rev=212123&root=gcc&view=rev
Log:
    PR fortran/36275
    PR fortran/38839

    * decl.c (check_bind_name_identifier): New function.
    (gfc_match_bind_c): Match any constant expression as binding
    label.
    * match.c (gfc_match_name_C): Remove.

    * gfortran.dg/binding_label_tests_2.f03: Adjust error messages.
    * gfortran.dg/binding_label_tests_27.f90: New file.

Added:
    trunk/gcc/testsuite/gfortran.dg/binding_label_tests_27.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/match.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/binding_label_tests_2.f03


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
       [not found] <bug-38839-4@http.gcc.gnu.org/bugzilla/>
  2014-06-08 22:37 ` [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names fxcoudert at gcc dot gnu.org
  2014-06-29 14:15 ` fxcoudert at gcc dot gnu.org
@ 2014-06-29 14:16 ` fxcoudert at gcc dot gnu.org
  2 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-06-29 14:16 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.10.0

--- Comment #7 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Fixed on trunk.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
  2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-12-10 19:11 ` dfranke at gcc dot gnu dot org
@ 2009-12-10 19:52 ` burnus at gcc dot gnu dot org
  4 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-12-10 19:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2009-12-10 19:52 -------
For "$" one should check whether it is allowed for the given target, cf.
DOLLARS_IN_IDENTIFIERS (-> gcc/c-opts.c and dollars_in_ident in libcpp/).

For UCN (universal-character name), the ASCII characters $, @ and ` are
allowed. Cf. C99 6.4.3 and libcpp _cpp_valid_ucn.

One could also think of supporting UCN with character kind=4 (cf. PR36275 and
PR 9449) - at least when -fextended-identifiers is specified - as vendor
extension. As gfortran uses libcpp and and has full support of wide chars, it
should not be difficult (but shall produce an error with -std=f2008).


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
  2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-10 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dfranke at gcc dot gnu dot org  2009-12-10 19:11 -------
See PR36275 for more possibilities on binding labels.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
  2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
  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
  4 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-29  8:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-29 08:46:40
               date|                            |


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
  2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-01-14 16:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2009-01-14 16:09 -------
For UCN see also PR 9449.


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names
  2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
@ 2009-01-14 16:01 ` burnus at gcc dot gnu dot org
  2009-01-14 16:09 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-01-14 16:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-01-14 16:00 -------
And for the universal-character-name, the following compiles with Intel's icc

void \u01ac(void) {
}

and should be valid C99. ICC generates the identifier "_u01ac". Using "gcc
-fextended-identifiers"
it shows up in the .o file as (readelf -a):
     8: 0000000000000000     6 FUNC    GLOBAL DEFAULT    1 ^^F^354


In the Fortran 2003 standard one finds:

R509 language-binding-spec is BIND (C [, NAME = scalar-char-initialization-expr
])
C540 (R509) The scalar-char-initialization-expr shall be of default character
kind.

That makes it a bit difficult to use UCNs ... From Fortran 2008 (below R508):

"NOTE 5.5
The C International Standard provides a facility for creating C identifiers
whose characters are not restricted to the C basic character set. Such a C
identifier is referred to as a universal character name (6.4.3 of the C
International Standard). The name of such a C identifier might include
characters that are not part of the representation method used by the processor
for default character. If so, the C entity cannot be referenced from Fortran."

Thus currently we only need to worry about '$' and maybe some others.
Optionally supporting non-default character strings and thus UCN might be done
later on (cf. also PR 38838 comment 3).


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-29 14:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38839-4@http.gcc.gnu.org/bugzilla/>
2014-06-08 22:37 ` [Bug fortran/38839] BIND(C): Allow non-digit/underscore/alphabetic binding names fxcoudert at gcc dot gnu.org
2014-06-29 14:15 ` fxcoudert at gcc dot gnu.org
2014-06-29 14:16 ` fxcoudert at gcc dot gnu.org
2009-01-14 15:37 [Bug fortran/38839] New: " burnus at gcc dot gnu dot org
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

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).