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]

[fortran,patch] Add SELECTED_CHAR_KIND intrinsic


Attached patch adds the Fortran 2003 SELECTED_CHAR_KIND intrinsic: front-end symbol, checking and simplifying routines, library routine, documentation and testcases (both valid and invalid code). This is really fairly straightforward. I include in that patch an unrelated diagnostics bug-fix: I realized that the following code

  integer, parameter :: k = 1
  print *, 42_k
  print *, k_"hello world"
  end

when compiled with -O2 -W -Wunused will give warnings that k is an unused parameter, which is not true. This is fixed by calling gfc_set_sym_referenced() on the appropriate kind value named constants right after they are successfully matched; this is done by two one-liners in primary.c.

Built on i386-apple-darwin8.10.1, will bootstrap and regtest on x86_64-linux as soon as I get back home (later today). OK to commit if it passes bootstrap and regtesting?

PS: Jerry, what's the status of ENCODING="..." I/O specifier? Can we already claim that we support Fortran 2003 international character sets (the requirements for that are fairly low, as quite a few compilers have a "yes" in that column and I know none that actually supports any nondefault character kind).

FX


Attachment: selected_char_kind.ChangeLog
Description: Binary data

Attachment: selected_char_kind.diff
Description: Binary data



--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/

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